This commit is contained in:
@@ -90,7 +90,8 @@ func (s *Service) execCommand(name string, args ...string) (string, error) {
|
|||||||
directCmd.Stdout = &directStdout
|
directCmd.Stdout = &directStdout
|
||||||
directCmd.Stderr = &directStderr
|
directCmd.Stderr = &directStderr
|
||||||
|
|
||||||
if directErr := directCmd.Run(); directErr == nil {
|
directErr := directCmd.Run()
|
||||||
|
if directErr == nil {
|
||||||
// Direct execution succeeded, return that result
|
// Direct execution succeeded, return that result
|
||||||
log.Printf("direct command execution succeeded (without sudo)")
|
log.Printf("direct command execution succeeded (without sudo)")
|
||||||
return strings.TrimSpace(directStdout.String()), nil
|
return strings.TrimSpace(directStdout.String()), nil
|
||||||
|
|||||||
Reference in New Issue
Block a user