Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Log shell exit code (for debugging)

  • Loading branch information...
commit 9df6d99c381de7439376ebc955bd96be86d755b8 1 parent 848d652
Yurii Rashkovskii authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 apps/htoad/src/htoad_shell.erl
View
4 apps/htoad/src/htoad_shell.erl
@@ -36,7 +36,7 @@ command_run_as_superuser(Engine, #shell{ cmd = Cmd, run_as = superuser } = Shell
lager:debug("Executing shell command as a super user (via sudo): ~s", [Cmd]),
{Code, Output} = htoad_shell_server:start(Shell#shell{ cmd = "/usr/bin/sudo -n " ++ Cmd }),
Result = adjust_output(Output, Shell),
- lager:debug("Shell output for `~s` (sudo): ~s", [Cmd,Result]),
+ lager:debug("Shell output for `~s` (sudo) (exit code ~w): ~s", [Cmd,Code,Result]),
htoad:assert(Engine, [{exit_status, Shell, Code}, {output, Shell, Result}]).
@@ -44,7 +44,7 @@ command(Engine, #shell{ cmd = Cmd, run_as = _ } = Shell) ->
lager:debug("Executing shell command: ~s", [Cmd]),
{Code, Output} = htoad_shell_server:start(Shell),
Result = adjust_output(Output, Shell),
- lager:debug("Shell output for `~s`: ~s", [Cmd, Result]),
+ lager:debug("Shell output for `~s` (exit code ~w): ~s", [Cmd,Code,Result]),
htoad:assert(Engine, [{exit_status, Shell, Code}, {output, Shell, Result}]).
Please sign in to comment.
Something went wrong with that request. Please try again.