Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI's User warning not accepting default #78

Open
cbirger opened this issue Feb 12, 2018 · 7 comments
Open

CLI's User warning not accepting default #78

cbirger opened this issue Feb 12, 2018 · 7 comments
Assignees

Comments

@cbirger
Copy link

cbirger commented Feb 12, 2018

When I use fissfc to delete a sample, the CLI asks me if I really want to delete the entity. The possible responses are Y\n, with Y (yes) being the default. If I just hit return, however, the default is not done. I have to explicitly respond with 'Y' in order for the fissfc command to be run.

wm8b6-23c:~ birger$ fissfc sample_delete -w CCL_Discordance_Portal -p broad-fc-ccl-discordance -e test8
WARNING: this will delete sample test8 in broad-fc-ccl-discordance/CCL_Discordance_Portal
Are you sure? [Y\n]:

@noblem
Copy link
Contributor

noblem commented Feb 13, 2018

Noted, Chet. We'll take a look after the dust settles from our DSP demo (of Hydrant) today.

@noblem
Copy link
Contributor

noblem commented Feb 16, 2018

Sam, can you look at this? It stems from Chet's work on the CCLE portal, which has a deadline of 1.5 weeks, so it'd be good if we can get the pieces he's using in tip-top shape. Last week I made a hotfix for another issue.

@sammeier
Copy link
Contributor

Yes, I have a proposed fix at hand, via a compatibility update from six.moves import input and a modification to the confirm prompt which either sets a default or accepts a default kwarg, but I'll walk through the use cases of _confirm_prompt to better determine the impact of this change.

@dheiman
Copy link
Collaborator

dheiman commented Feb 16, 2018

Is this actually a fix though? Looking at the code, the prompt never had a default. If a user wants to auto-confirm and skip all prompts, then they can simply give the -y flag to fissfc before specifying their function.

@sammeier
Copy link
Contributor

In my opinion, both scenarios are valid use cases. The user shouldn't be required to pass a global flag in order to accept a default input response.

@cbirger
Copy link
Author

cbirger commented Feb 16, 2018

Note there is no need to rush and fix this (I don't need it for the data portal I'm developing)...it is just some anomalous behavior I observed and I wanted to report it back the team.

@dheiman
Copy link
Collaborator

dheiman commented Feb 16, 2018

@sammeier, I'm saying I'm not sure I agree that there should be a default response. The global flag removes the prompts altogether, it doesn't create a default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants