Commit 47f4d2db authored by Drew's avatar Drew

Don't allow build to proceed if the external tool failed

parent 94047266
......@@ -4,5 +4,8 @@ final class Shell : Tool {
guard let script = args["script"]?.string else { throw AnarchyBuildError.CantParseYaml("Invalid 'script' argument to shell tool.") }
let t = NSTask.launchedTaskWithLaunchPath("/bin/sh", arguments: ["-c",script])
t.waitUntilExit()
if t.terminationStatus != 0 {
throw AnarchyBuildError.ExternalToolFailed("/bin/sh -c \(script)")
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment