Log error and exit with code if invalid command. Closes #60

pull/61/head
Miguel Mota 4 years ago
parent 19b3fc6193
commit c16fc03120

1
.gitignore vendored

@ -43,6 +43,7 @@ bin
main
!main.go
wasm
.config
# flatpak
.flatpak-builder

@ -1,5 +1,10 @@
package cmd
import (
"fmt"
"os"
)
// Execute executes the program
func Execute() {
rootCmd := RootCmd()
@ -15,6 +20,7 @@ func Execute() {
)
if err := rootCmd.Execute(); err != nil {
panic(err)
fmt.Println(err)
os.Exit(1)
}
}

Loading…
Cancel
Save