From 63a0c5fb32d4181c836de96fd22e9c6ae0d0f9e5 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 15 Aug 2016 18:34:21 -0700 Subject: [PATCH] pixiecore/cli: make CLI() consistently os.Exit() when done. --- pixiecore/cli/cli.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pixiecore/cli/cli.go b/pixiecore/cli/cli.go index fef8ad5..6f8761c 100644 --- a/pixiecore/cli/cli.go +++ b/pixiecore/cli/cli.go @@ -32,6 +32,8 @@ import ( var Ipxe = map[pixiecore.Firmware][]byte{} // CLI runs the Pixiecore commandline. +// +// This function always exits back to the OS when finished. func CLI() { // The ipxe firmware flags need to be set outside init(), so that // the default flag value is computed appropriately based on @@ -48,6 +50,7 @@ func CLI() { fmt.Println(err) os.Exit(-1) } + os.Exit(0) } // This represents the base command when called without any subcommands