Skip to content

Commit

Permalink
chore: Improve error message when stderr is empty (#604)
Browse files Browse the repository at this point in the history
Co-authored-by: Itay Levy <[email protected]>
  • Loading branch information
ItayLevyOfficial and Itay Levy authored Nov 13, 2023
1 parent 50ccffb commit 4bd2530
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/utils/bash_commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ func RunBashCmdAsync(cmd *exec.Cmd, printOutput func(), parseError func(errMsg s
err := cmd.Start()
if err != nil {
errMsg := parseError(stderr.String())
if errMsg == "" {
PrettifyErrorIfExists(err)
}
PrettifyErrorIfExists(errors.New(errMsg))
}
printOutput()
Expand Down

0 comments on commit 4bd2530

Please sign in to comment.