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
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
..
bundlefile
checkpoint Print checkpoint id when creating a checkpoint 2016-12-01 23:30:14 -05:00
commands Give a order to AddCommands, for easy read and maintenance. 2016-12-08 16:43:14 +08:00
container Merge pull request #30203 from allencloud/validate-healthcheck-params-in-daemon-side 2017-02-01 21:19:30 -05:00
formatter Add docker plugin upgrade 2017-02-03 16:21:12 -05:00
idresolver
image Merge pull request #29692 from yongtang/29492-daemon-shm-size 2017-02-01 16:56:10 +01:00
inspect Move templates to pkg/templates 2016-12-12 09:34:03 +01:00
network Add version annotation to various flags added in 1.13 2017-01-16 18:21:20 +01:00
node Add some unit tests to the node and swarm cli code 2017-01-09 18:30:15 +01:00
plugin Fix "command.PromptForConfirmation" to accept "enter" for the "N" default 2017-02-06 09:13:07 -08:00
prune Add --filter until=<timestamp> for docker container/image prune 2017-01-04 14:16:42 -08:00
registry change minor mistake of spelling 2016-12-20 21:05:19 +08:00
secret remove cli/command/secrets/utils.go 2017-01-29 13:32:49 +08:00
service Merge pull request #30180 from allencloud/add-endpoint-mode-a-default-value 2017-02-02 11:51:44 -08:00
stack Add --format to docker service ls 2017-02-01 08:33:19 -08:00
swarm Add version annotation to various flags added in 1.13 2017-01-16 18:21:20 +01:00
system return error when listNode fails 2017-01-19 14:02:06 +08:00
task Add some unit tests to the node and swarm cli code 2017-01-09 18:30:15 +01:00
volume Merge pull request #26830 from dnephin/man-desc-in-files 2017-01-03 17:47:49 +01:00
cli.go Add some unit tests to the node and swarm cli code 2017-01-09 18:30:15 +01:00
events_utils.go
in.go
out.go
registry.go Remove use of forked reference package for cli 2017-01-19 16:04:50 -08:00
trust.go fix flag descriptions for content-trust 2017-01-23 14:52:36 +01:00
utils.go Fix "command.PromptForConfirmation" to accept "enter" for the "N" default 2017-02-06 09:13:07 -08:00