1
0
mirror of https://github.com/fumiama/terasu-cloudflared.git synced 2026-06-07 19:40:30 +08:00

TUN-5954: Start cloudflared service in Linux too similarly to other OSs

This commit is contained in:
Nuno Diegues
2022-03-25 10:51:15 +00:00
parent 62e1330e45
commit 092e76eb55
4 changed files with 31 additions and 13 deletions

View File

@@ -95,10 +95,10 @@ func runCommand(command string, args ...string) error {
return fmt.Errorf("error starting %s: %v", command, err)
}
_, _ = ioutil.ReadAll(stderr)
output, _ := ioutil.ReadAll(stderr)
err = cmd.Wait()
if err != nil {
return fmt.Errorf("%s returned with error: %v", command, err)
return fmt.Errorf("%s %v returned with error code %v due to: %v", command, args, err, string(output))
}
return nil
}