-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Default --interactive
to true
across the commands
#35165
Comments
@baronfel
|
minor typo on my part - we should default That question is a pretty big one, and as you've seen there are a bunch of shell-specific ways to handle this. I have two concerns with this: a) we don't have a strong set of code patterns already for 'here is how to answer question X in shell Y' + 'here are the Z shells we support', and b) many of these shell-specific detections involve running shell builtin commands, which would be process overhead - this is the kind of thing I'd like to keep to a minimum to prevent unnecessary work. I do think having that framework for answering shell-specific questions in a per-unique-shell way would be really useful to have though! I also agree with the CI check, good thinking. The child process idea is a little more nebulous to me - technically pushes glasses up nose we're always going to be the child process of the shell that spawned us - but more generally being a child process isn't a problematic thing here, the redirection of the stdin/stdout/stderr streams is what would actually prevent us from prompting for interactive states. It just so happens that it's quite common to be redirected when being spawned as a child process of some other command. Make sense? |
@baronfel |
We have some of this for Terminal Logger now, so we should be able to re-use that for determining the default for this flag in CI/non-CI scenarios. |
Describe the bug
Many commands that interact with NuGet have an
--interactive
flag that is used to signal that the user can be prompted for additional credentials. We should default this to 'true' instead of false so that user-driven sessions Just Work ™️.We have several different
--interactive
flags that we should change at the same time, and we should have detection of common ways to signal that the session is not interactive:PS1
is set)The text was updated successfully, but these errors were encountered: