Service fix for Catalina
This commit is contained in:
parent
af022d01b4
commit
aaf493714b
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue