Add explicit user-service autostart configuration
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@@ -26,6 +27,13 @@ func Uninstall(executable string, args []string, in io.Reader, out io.Writer) er
|
||||
if len(f.Args()) > 0 {
|
||||
return fmt.Errorf("uninstall takes no positional arguments")
|
||||
}
|
||||
if path, err := serviceFile(runtime.GOOS); err == nil {
|
||||
if _, err = os.Lstat(path); err == nil {
|
||||
return fmt.Errorf("disable autostart with pipelines service disable before uninstalling (%s)", path)
|
||||
} else if !os.IsNotExist(err) {
|
||||
return err
|
||||
}
|
||||
}
|
||||
resolved, err := filepath.EvalSymlinks(executable)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user