mirror of https://github.com/docker/cli.git
21c0b6c0e6
This adjusts `command.PromptForConfirmation` in `cli/command/utils.go` to use `bufio`'s `ReadLine` rather than using `fmt.Fscan` for reading input, which makes `<Enter>` properly accept the default value of "No" as one would expect. This new code actually came from `cli/command/plugin/install.go`'s `acceptPrivileges` function, which I've also refactored here to use `command.PromptForConfirmation` as it should. Additionally, this updates `cli/command/plugin/upgrade.go`'s `runUpgrade` function to use `command.PromptForConfirmation` for further consistency. Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com> |
||
---|---|---|
command | ||
compose | ||
config | ||
debug | ||
flags | ||
internal/test | ||
trust | ||
cobra.go | ||
error.go | ||
required.go |