You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cd...@apache.org on 2017/04/18 12:15:11 UTC
[05/15] git commit: [flex-utilities]
[refs/heads/feature/flash-downloader] - ant_on_air: Exec task makes Ant fail
if failonerror is true and the NativeProcessExitEvent exitCode is not 0
ant_on_air: Exec task makes Ant fail if failonerror is true and the NativeProcessExitEvent exitCode is not 0
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/903fddec
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/903fddec
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/903fddec
Branch: refs/heads/feature/flash-downloader
Commit: 903fddecda2c30e6069db5763baec51dca5a82c7
Parents: 60b0452
Author: Josh Tynjala <jo...@apache.org>
Authored: Mon Nov 21 14:35:44 2016 -0800
Committer: Josh Tynjala <jo...@apache.org>
Committed: Mon Nov 21 14:35:44 2016 -0800
----------------------------------------------------------------------
.../ant_on_air/src/org/apache/flex/ant/tags/Exec.as | 12 ++++++++++++
1 file changed, 12 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/903fddec/flex-installer/ant_on_air/src/org/apache/flex/ant/tags/Exec.as
----------------------------------------------------------------------
diff --git a/flex-installer/ant_on_air/src/org/apache/flex/ant/tags/Exec.as b/flex-installer/ant_on_air/src/org/apache/flex/ant/tags/Exec.as
index bc503a6..e5eced7 100644
--- a/flex-installer/ant_on_air/src/org/apache/flex/ant/tags/Exec.as
+++ b/flex-installer/ant_on_air/src/org/apache/flex/ant/tags/Exec.as
@@ -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));
}