1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/cli/command/plugin
Tianon Gravi 2198b0568f Fix "command.PromptForConfirmation" to accept "enter" for the "N" default
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>
2017-02-06 09:13:07 -08:00
..
cmd.go Add docker plugin upgrade 2017-02-03 16:21:12 -05:00
create.go Remove use of forked reference package for cli 2017-01-19 16:04:50 -08:00
disable.go Add [OPTIONS] to usage of plugin disable|push 2017-01-27 16:17:02 +01:00
enable.go Implement content addressability for plugins 2016-12-23 13:29:58 -08:00
inspect.go Fix usage message of plugin inspect 2016-12-31 09:55:04 -08:00
install.go Fix "command.PromptForConfirmation" to accept "enter" for the "N" default 2017-02-06 09:13:07 -08:00
list.go Add --filter enabled=true for docker plugin ls 2017-01-26 13:16:11 -08:00
push.go Add [OPTIONS] to usage of plugin disable|push 2017-01-27 16:17:02 +01:00
remove.go Implement content addressability for plugins 2016-12-23 13:29:58 -08:00
set.go Implement content addressability for plugins 2016-12-23 13:29:58 -08:00
upgrade.go Fix "command.PromptForConfirmation" to accept "enter" for the "N" default 2017-02-06 09:13:07 -08:00