Allow kapow server to run without .pow file and non-interactive

Co-authored-by: pancho horrillo <pedrofelipe.horrillo@bbva.com>
This commit is contained in:
Roberto Abdelkader Martínez Pérez
2019-10-22 11:56:18 +02:00
parent fa394ce997
commit 28a0be1d87
+2
View File
@@ -30,6 +30,7 @@ var ServerCmd = &cobra.Command{
go server.StartServer(controlBind, dataBind, userBind)
// start sub shell + ENV(KAPOW_CONTROL_URL)
if len(args) > 0 {
powfile := args[0]
_, err := os.Stat(powfile)
if os.IsNotExist(err) {
@@ -47,6 +48,7 @@ var ServerCmd = &cobra.Command{
}
fmt.Println()
log.Printf("Done running powfile: %q\n", powfile)
}
select {}
},