Skip to content

Commit

Permalink
Errors reported back on execute
Browse files Browse the repository at this point in the history
  • Loading branch information
LAK committed Feb 2, 2012
1 parent 3173d3d commit 2e5fad5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 2 additions & 0 deletions product/dropkick/DeploymentModel/DeploymentPlan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ public DeploymentResult Execute()
deploymentResult.MergedWith(o);
if (o.ContainsError())
{
//display errors!
DisplayResults(o);
//stop. report verify error.
return;
}
Expand Down
15 changes: 9 additions & 6 deletions product/dropkick/Tasks/Files/CopyFileTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ public override DeploymentResult VerifyCanRun()
_to = _path.GetFullPath(_to);

ValidatePaths(result);

result.AddGood(Name);
if(!result.ContainsError()) {
//don't report back 'good' on errors
result.AddGood(Name);
}

return result;
}
Expand All @@ -59,11 +61,12 @@ public override DeploymentResult Execute()
_to = _path.GetFullPath(_to);

ValidatePaths(result);
if(!result.ContainsError()) {
//don't continue on errors
CopyFile(result, _newFileName, _from, _to);

CopyFile(result, _newFileName, _from, _to);

result.AddGood(Name);

result.AddGood(Name);
}
return result;
}

Expand Down

0 comments on commit 2e5fad5

Please sign in to comment.