Skip to content

Commit

Permalink
(GH-305) Installer Type Validate Exit Code
Browse files Browse the repository at this point in the history
When an uninstall finishes, the exit code of zero may not be the only
valid exit code. Allow the installer type to validate the exit code
against its valid uninstall exit codes. This will catch things like
with MSI with 0, 1641, and 3010 (all successful codes), and also 1605
and 1641 (for when the product was not installed, perhaps uninstalled
by a different means) as also valid since the end state is that the
application is no longer installed.
  • Loading branch information
ferventcoder committed Jun 4, 2015
1 parent 44431e6 commit 0dc79e3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public void run(PackageResult packageResult, ChocolateyConfiguration config)
},
updateProcessPath: false);

if (exitCode != 0)
if (!installer.ValidUninstallExitCodes.Contains(exitCode))
{
Environment.ExitCode = exitCode;
string logMessage = " Auto uninstaller failed. Please remove machine installation manually.";
Expand Down

0 comments on commit 0dc79e3

Please sign in to comment.