flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joshtynj...@apache.org
Subject git commit: [flex-utilities] [refs/heads/develop] - ant_on_air: Exec task makes Ant fail if failonerror is true and the NativeProcessExitEvent exitCode is not 0
Date Mon, 21 Nov 2016 22:35:51 GMT
Repository: flex-utilities
Updated Branches:
  refs/heads/develop 60b045275 -> 903fddecd


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/develop
Commit: 903fddecda2c30e6069db5763baec51dca5a82c7
Parents: 60b0452
Author: Josh Tynjala <joshtynjala@apache.org>
Authored: Mon Nov 21 14:35:44 2016 -0800
Committer: Josh Tynjala <joshtynjala@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));
         }
         


Mime
View raw message