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

@@ -2,6 +2,7 @@ package cmd
import (
"fmt"
"os"
"strconv"
"github.com/spf13/cobra"
@@ -42,6 +43,7 @@ Please take a look at the usage below to customize the startup options`,
err := winService.Install(serviceArgs...)
if err != nil {
fmt.Printf("Error installing service: %v\r\n", err)
os.Exit(1)
} else {
fmt.Printf("Service installed!\r\n")
}