Skip to content

Commit

Permalink
Terminate script interpretation on failure to execute a shell script
Browse files Browse the repository at this point in the history
  • Loading branch information
anatoliykmetyuk committed Apr 14, 2020
1 parent 8263dfe commit eb499f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion IssueRunner.scala
Expand Up @@ -72,7 +72,9 @@ object IssueRunner extends AutoPlugin with IssueRunnerPhases {

case ShellCommand(cmd) =>
debug(s"Executing shell command at $currentWorkdir:\n$cmd")
exec(cmd, currentWorkdir)
val exitCode = exec(cmd, currentWorkdir)
if (exitCode != 0)
throw new RuntimeException(s"$cmd exited with status code $exitCode")

case ChangeWorkdirCommand(wd) =>
debug(s"Changing workdir from $currentWorkdir to $wd")
Expand Down

0 comments on commit eb499f8

Please sign in to comment.