Skip to content

Commit

Permalink
Capture stdout when no error printed in stderr (#9)
Browse files Browse the repository at this point in the history
Signed-off-by: Aravinda Vishwanathapura <mail@aravindavk.in>
  • Loading branch information
aravindavk committed May 31, 2024
1 parent 67ed09e commit fb2f368
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/helpers.cr
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ module GlusterCLI
end

if rc != 0
raise CommandException.new(rc, err)
msg = err.strip == "" ? resp.strip : err.strip
raise CommandException.new(rc, msg)
end

resp
Expand Down

0 comments on commit fb2f368

Please sign in to comment.