Skip to content
Permalink
Browse files
ant_on_air: Exec task makes Ant fail if failonerror is true and the N…
…ativeProcessExitEvent exitCode is not 0
  • Loading branch information
joshtynjala committed Nov 21, 2016
1 parent 60b0452 commit 903fddecda2c30e6069db5763baec51dca5a82c7
Showing 1 changed file with 12 additions and 0 deletions.
@@ -126,11 +126,23 @@ package org.apache.flex.ant.tags
{
return getAttributeValue("@outputproperty");
}

override public function get failonerror():Boolean
{
var val:String = getNullOrAttributeValue("@failonerror");
//if omitted, defaults to false
return val == null ? false : val == "true";
}

private var process:NativeProcess;

private function exitHandler(event:NativeProcessExitEvent):void
{
if(event.exitCode !== 0 && failonerror)
{
ant.project.failureMessage = "Exec task failed: " + fileName;
ant.project.status = false;
}
dispatchEvent(new Event(Event.COMPLETE));
}

0 comments on commit 903fdde

Please sign in to comment.