handle errors before first custom step is run

Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/146334f9
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/146334f9
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/146334f9

Branch: refs/heads/develop
Commit: 146334f94e15eaeff27f21393e266dfb55dba489
Parents: bf3513c
Author: Alex Harui <[email protected]>
Authored: Fri Jan 17 06:34:40 2014 -0800
Committer: Alex Harui <[email protected]>
Committed: Fri Jan 17 06:34:40 2014 -0800

----------------------------------------------------------------------
 installer/src/InstallApacheFlex.mxml | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/146334f9/installer/src/InstallApacheFlex.mxml
----------------------------------------------------------------------
diff --git a/installer/src/InstallApacheFlex.mxml 
b/installer/src/InstallApacheFlex.mxml
index d1621fe..f877c89 100644
--- a/installer/src/InstallApacheFlex.mxml
+++ b/installer/src/InstallApacheFlex.mxml
@@ -1145,11 +1145,13 @@ variables are not required because the locations of 
these pieces are known.
         
         private function completeHandler(event:Event):void
         {
-            if (!Ant.currentAnt.project.status)
-                updateActivityStep(stepLabels[currentStep - 1], 
StepItem.ERROR);
-            else if (currentStep == stepLabels.length)
-                updateActivityStep(stepLabels[currentStep - 1], 
StepItem.COMPLETE);
-        
+            if (currentStep > 0)
+            {
+                if (!Ant.currentAnt.project.status)
+                    updateActivityStep(stepLabels[currentStep - 1], 
StepItem.ERROR);
+                else if (currentStep == stepLabels.length)
+                    updateActivityStep(stepLabels[currentStep - 1], 
StepItem.COMPLETE);
+            }        
             cleanup(!Ant.currentAnt.project.status);
         }
         

Reply via email to