Return the results on error

This commit is contained in:
Juan Font Alonso 2022-09-07 23:53:31 +02:00
parent b27b789e28
commit cb70d7c705

View file

@ -121,7 +121,7 @@ func ExecuteCommand(
return stdout.String(), nil return stdout.String(), nil
case <-time.After(execConfig.timeout): case <-time.After(execConfig.timeout):
return "", fmt.Errorf("command timed out after %s", execConfig.timeout) return stderr.String(), fmt.Errorf("command timed out after %s", execConfig.timeout)
} }
} }