pixiecore/cli: make CLI() consistently os.Exit() when done.

This commit is contained in:
David Anderson 2016-08-15 18:34:21 -07:00
parent 04527f7dfd
commit 63a0c5fb32

View File

@ -32,6 +32,8 @@ import (
var Ipxe = map[pixiecore.Firmware][]byte{} var Ipxe = map[pixiecore.Firmware][]byte{}
// CLI runs the Pixiecore commandline. // CLI runs the Pixiecore commandline.
//
// This function always exits back to the OS when finished.
func CLI() { func CLI() {
// The ipxe firmware flags need to be set outside init(), so that // The ipxe firmware flags need to be set outside init(), so that
// the default flag value is computed appropriately based on // the default flag value is computed appropriately based on
@ -48,6 +50,7 @@ func CLI() {
fmt.Println(err) fmt.Println(err)
os.Exit(-1) os.Exit(-1)
} }
os.Exit(0)
} }
// This represents the base command when called without any subcommands // This represents the base command when called without any subcommands