Service fix for Catalina

This commit is contained in:
Frank Denis 2019-10-12 22:05:46 +02:00
parent af022d01b4
commit aaf493714b
1 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@
package service
import (
"bytes"
"fmt"
"io"
"io/ioutil"
@ -99,7 +100,7 @@ func runCommand(command string, readStdout bool, arguments ...string) (int, stri
// so check for emtpy stderr
if command == "launchctl" {
slurp, _ := ioutil.ReadAll(stderr)
if len(slurp) > 0 {
if len(slurp) > 0 && !bytes.HasSuffix(slurp, []byte("Operation now in progress\n")) {
return 0, "", fmt.Errorf("%q failed with stderr: %s", command, slurp)
}
}