Skip to content

Commit

Permalink
(GH-305) Fix: uninstaller confirm if no silent
Browse files Browse the repository at this point in the history
When the user selects `Yes`, proceed with the uninstaller. Otherwise
skip.
  • Loading branch information
ferventcoder committed Jun 20, 2015
1 parent 51f45a4 commit 3cff29f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public void run(PackageResult packageResult, ChocolateyConfiguration config)
}

var logLocation = _fileSystem.combine_paths(_fileSystem.get_full_path(config.CacheLocation), "chocolatey", pkgInfo.Package.Id, pkgInfo.Package.Version.to_string());
this.Log().Debug(()=>" Setting up uninstall logging directory at {0}".format_with(logLocation));
_fileSystem.create_directory_if_not_exists(_fileSystem.get_directory_name(logLocation));
uninstallArgs = uninstallArgs.Replace(InstallTokens.PACKAGE_LOCATION, logLocation);

Expand All @@ -142,7 +143,7 @@ public void run(PackageResult packageResult, ChocolateyConfiguration config)
if (config.PromptForConfirmation)
{
var selection = InteractivePrompt.prompt_for_confirmation("Uninstall may not be silent (could not detect). Proceed?", new[] {"yes", "no"}, defaultChoice: null, requireAnswer: true);
if (selection.is_equal_to("no")) skipUninstaller = false;
if (selection.is_equal_to("yes")) skipUninstaller = false;
}

if (skipUninstaller)
Expand Down

0 comments on commit 3cff29f

Please sign in to comment.