Return errors
This commit is contained in:
parent
be88f1b82a
commit
74e7ef4451
1 changed files with 2 additions and 2 deletions
4
main.go
4
main.go
|
@ -52,10 +52,10 @@ func findRepositoriesInDirectory(dir string) (string, error) {
|
|||
if exitErr, ok := err.(*exec.ExitError); ok {
|
||||
exitCode := exitErr.ExitCode()
|
||||
|
||||
fmt.Printf("Command failed with exit code %d\n", exitCode)
|
||||
return "", fmt.Errorf("Command failed with exit code %d\n", exitCode)
|
||||
}
|
||||
|
||||
fmt.Printf("find failed on %s: %v\nOutput: %s\n", dir, err, string(output))
|
||||
return "", fmt.Errorf("find failed on %s: %w\nOutput: %s", dir, err, string(output))
|
||||
}
|
||||
|
||||
return string(output), nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue