Skip to content

Commit

Permalink
(GH-323) Do not run autouninstaller unless success
Browse files Browse the repository at this point in the history
If for any reason the package is in failure mode, we should continue to
let it be in failure mode and not mess up the state of the uninstall,
since the package uninstall will be considered a failure.
  • Loading branch information
ferventcoder committed Jun 10, 2015
1 parent 8f9b589 commit 81146c7
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,10 @@ public ConcurrentDictionary<string, PackageResult> uninstall_run(ChocolateyConfi
_powershellService.uninstall(config, packageResult);
}

_autoUninstallerService.run(packageResult, config);
if (packageResult.Success)
{
_autoUninstallerService.run(packageResult, config);
}

// we don't care about the exit code
if (config.Information.PlatformType == PlatformType.Windows) CommandExecutor.execute("shutdown", "/a", config.CommandExecutionTimeoutSeconds, _fileSystem.get_current_directory(), (s, e) => { }, (s, e) => { }, false);
Expand Down

0 comments on commit 81146c7

Please sign in to comment.