Skip to content

Commit

Permalink
Merge pull request #567 from Sitecore/hotfix/563-DeleteSitecoreEnviro…
Browse files Browse the repository at this point in the history
…nmentData-processor-is-run-even-in-case-SIM.Pipelines.Delete.CleanUp-one-fails

Fix 563
  • Loading branch information
AndreyFilchenkov authored Mar 10, 2021
2 parents a6fd33c + 9e47c62 commit adc5729
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/SIM.Pipelines/Delete/CleanUp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@ protected override void Process([NotNull] ProcessorArgs args)
return;
}

Directory.Delete(arguments.Tasker.UnInstallParamsPath, true);
InstallParam param = arguments.Tasker.GlobalParams.FirstOrDefault(p => p.Name == "DeployRoot");
if (param!=null)
{
int retrisNumber = 3;
for (int i=0;i<= retrisNumber; i++)
int retriesNumber = 3;
for (int i=0;i<= retriesNumber; i++)
{
if (Directory.Exists(param.Value))
{
Expand All @@ -45,7 +44,7 @@ protected override void Process([NotNull] ProcessorArgs args)
}
if (Directory.Exists(param.Value))
{
if (retrisNumber==i)
if (retriesNumber == i)
{
throw new Exception($"Can't remove directory: {param.Value}");
}
Expand All @@ -58,6 +57,8 @@ protected override void Process([NotNull] ProcessorArgs args)
}
}
}

Directory.Delete(arguments.Tasker.UnInstallParamsPath, true);
}
}
}

0 comments on commit adc5729

Please sign in to comment.