Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninstall prompts for a version when there is only one installed #186

Closed
christianrondeau opened this issue Mar 20, 2015 · 2 comments
Closed

Comments

@christianrondeau
Copy link
Contributor

I'm not sure how to reproduce. Maybe this happens when failing previous uninstalls.

Here are examples:

PS C:\> choco uninstall vagrant
Chocolatey v0.9.9.2
Uninstalling the following packages:
vagrant
Which version of vagrant would you like to uninstall?
 1) None [Default - Press Enter]
 2) 1.5.4

Another example:

PS C:\> choco uninstall virtualbox
Chocolatey v0.9.9.2
Uninstalling the following packages:
virtualbox
Which version of virtualbox would you like to uninstall?
 1) None [Default - Press Enter]
 2) 4.3.12

Here is an example of the previous attempt to install all versions of a package. Might be related.

PS C:\> choco uninstall vagrant
Chocolatey v0.9.9.2
Uninstalling the following packages:
vagrant
Which version of vagrant would you like to uninstall?
 1) None [Default - Press Enter]
 2) 1.5.4
 3) 1.6.3
 4) 1.6.5
 5) All versions
5
You selected to remove all versions of vagrant
vagrant not uninstalled. An error occurred during uninstall:
 Could not find a part of the path 'C:\ProgramData\chocolatey\lib\vagrant.1.5.4\vagrant.1.5.4.nupkg'.
This is try 1/3. Retrying after 300 milliseconds.
 Error converted to warning:
 Cannot create a file when that file already exists.

This is try 2/3. Retrying after 400 milliseconds.
 Error converted to warning:
 Cannot create a file when that file already exists.

Maximum tries of 3 reached. Throwing error.
Move failed with message:
 Cannot create a file when that file already exists.

 Attempting backup move method.

vagrant v1.6.3
 vagrant has been successfully uninstalled.
This is try 1/3. Retrying after 300 milliseconds.
 Error converted to warning:
 Cannot create a file when that file already exists.

This is try 2/3. Retrying after 400 milliseconds.
 Error converted to warning:
 Cannot create a file when that file already exists.

Maximum tries of 3 reached. Throwing error.
Move failed with message:
 Cannot create a file when that file already exists.

 Attempting backup move method.

vagrant v1.6.5
 Skipping auto uninstaller - AutoUninstaller feature is not enabled.
 Skipping auto uninstaller - AutoUninstaller feature is not enabled.
 vagrant has been successfully uninstalled.

Chocolatey uninstalled 2/3 packages. 1 packages failed.
See the log for details.
Failures
 - vagrant

For more details: https://groups.google.com/forum/#!topic/chocolatey/UVncL7PxXRg

(Moved from chocolatey-archive/chocolatey#694)

@ferventcoder ferventcoder modified the milestone: 0.9.9.3 Mar 20, 2015
@ferventcoder ferventcoder modified the milestones: 0.9.9.3, 0.9.9.5 Mar 30, 2015
ferventcoder added a commit that referenced this issue Apr 14, 2015
If there is only one version installed, uninstall should not prompt for
which version to remove. It should just move forward removing that
version.
@ferventcoder ferventcoder self-assigned this Apr 17, 2015
@ferventcoder
Copy link
Member

Thanks for reporting this. Should be resolved in 0.9.9.5! :)

@christianrondeau
Copy link
Contributor Author

Great! :)

ferventcoder added a commit that referenced this issue Apr 20, 2015
* stable: (22 commits)
  (GH-121) Making Uninstall-ChocolateyZipPackage more robust when
deleting files that were copied during installation of the Zip package
  (doc) update changelog/nuspec
  (GH-238) ApiKey source matching intuitive
  (maint) formatting
  (GH-240) Set CredentialProvider for NuGet
  (GH-240) ChocolateyNugetCredentialProvider
  (GH-240) Add default sources to machine sources
  (maint) Only warn subcommand list if not empty
  (GH-171) Use RedirectedHttpClient
  (GH-240) pass credentials at runtime
  (GH-240)(config) Add machine sources
  (doc) how to quote values
  (GH-230) Export all functions and aliases imported
  (GH-230) Fix Issues with Generate/Remove BinFile
  (GH-185) Remove console prompt default choices
  (GH-186) Uninstall - no prompt for one version
  (GH-182) Ask before printing ps1 scripts
  (GH-187) Show log file path in messages.
  (maint) formatting
  (GH-169) Do not resolve disabled sources
  ...

Conflicts:
	src/chocolatey/infrastructure.app/commands/ChocolateySourceCommand.cs
	src/chocolatey/infrastructure.app/runners/GenericRunner.cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants