1
0
mirror of https://github.com/drakkan/sftpgo.git synced 2025-11-29 22:08:10 +02:00

return exit code 1 on error

Fixes #132
This commit is contained in:
Nicola Murino
2020-06-20 14:30:46 +02:00
parent 8cb47817f6
commit b80abe6c05
12 changed files with 41 additions and 4 deletions

View File

@@ -1,6 +1,8 @@
package cmd
import (
"os"
"github.com/spf13/cobra"
"github.com/drakkan/sftpgo/service"
@@ -31,7 +33,9 @@ Please take a look at the usage below to customize the startup options`,
}
if err := service.Start(); err == nil {
service.Wait()
os.Exit(0)
}
os.Exit(1)
},
}
)