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"
"github.com/spf13/cobra"
@@ -21,6 +22,7 @@ var (
err := s.Uninstall()
if err != nil {
fmt.Printf("Error removing service: %v\r\n", err)
os.Exit(1)
} else {
fmt.Printf("Service uninstalled\r\n")
}