From 1c6ae73a898222a14b98526339d9985c51f88d35 Mon Sep 17 00:00:00 2001 From: Sujil02 Date: Tue, 5 May 2020 22:29:54 -0400 Subject: Adds tunnel routes for system reset. Adds tunnel routes for system reset. Makes forces flag local as options are not propogated down the stack. Adds relevant test cases and swagger docs. Signed-off-by: Sujil02 --- cmd/podman/system/reset.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'cmd/podman') diff --git a/cmd/podman/system/reset.go b/cmd/podman/system/reset.go index 22ddc7529..6caa91690 100644 --- a/cmd/podman/system/reset.go +++ b/cmd/podman/system/reset.go @@ -26,10 +26,8 @@ var ( Long: systemResetDescription, Run: reset, } -) -var ( - systemResetOptions entities.SystemResetOptions + forceFlag bool ) func init() { @@ -39,12 +37,12 @@ func init() { Parent: systemCmd, }) flags := systemResetCommand.Flags() - flags.BoolVarP(&systemResetOptions.Force, "force", "f", false, "Do not prompt for confirmation") + flags.BoolVarP(&forceFlag, "force", "f", false, "Do not prompt for confirmation") } func reset(cmd *cobra.Command, args []string) { // Prompt for confirmation if --force is not set - if !systemResetOptions.Force { + if !forceFlag { reader := bufio.NewReader(os.Stdin) fmt.Print(` WARNING! This will remove: @@ -74,7 +72,7 @@ Are you sure you want to continue? [y/N] `) } defer engine.Shutdown(registry.Context()) - if err := engine.Reset(registry.Context(), systemResetOptions); err != nil { + if err := engine.Reset(registry.Context()); err != nil { fmt.Println(err) os.Exit(125) } -- cgit v1.2.3-54-g00ecf