Change recoverable errors to warn log level to stop shell from exiting

This commit is contained in:
Arsen Musayelyan 2021-08-21 14:15:55 -07:00
parent 95cf5bfe6b
commit 986d2064a7
2 changed files with 5 additions and 3 deletions

View File

@ -36,9 +36,10 @@ var timeCmd = &cobra.Command{
// Ensure required arguments
if len(args) != 1 {
cmd.Usage()
log.Fatal().Msg("Command time requires one argument")
log.Warn().Msg("Command time requires one argument")
return
}
// Connect to itd UNIX socket
conn, err := net.Dial("unix", SockPath)
if err != nil {

View File

@ -60,7 +60,8 @@ var upgradeCmd = &cobra.Command{
}
} else {
cmd.Usage()
log.Fatal().Msg("Upgrade command requires either archive or init packet and firmware.")
log.Warn().Msg("Upgrade command requires either archive or init packet and firmware.")
return
}
// Encode response into connection