Skip to content

Commit

Permalink
More error output when command runner error fails
Browse files Browse the repository at this point in the history
This changes the error logged when a command fails to include the stderr message
along with the exit code. This will be more helpful in trying to
identify command failure reasons
  • Loading branch information
jjcarstens authored and fhunleth committed Feb 19, 2022
1 parent 90da0a9 commit f74dfa8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/vintage_net/interface/command_runner.ex
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,13 @@ defmodule VintageNet.Interface.CommandRunner do
{_, 0} ->
:ok

{_, not_zero} ->
Logger.error("Nonzero exit from #{command}, #{inspect(args)}: #{not_zero}")
{err, not_zero} ->
Logger.error("""
Nonzero exit from #{command}, #{inspect(args)}: #{not_zero}
#{inspect(err)}
""")

{:error, :non_zero_exit}
end
end
Expand Down

0 comments on commit f74dfa8

Please sign in to comment.