flofreud / posh-gvm

GVM for Powershell
Apache License 2.0
210 stars 60 forks source link

posh-gvm uninstall fails due to bug in Remove-Item -Recurse #6

Closed billjamesdev closed 9 years ago

billjamesdev commented 9 years ago

When trying to uninstall older versions of Gradle, etc. the "gvm uninstall gradle " fails with the following error (user-specific path removed): Remove-Item : Directory C:\XXXX.posh_gvm\gradle\1.12\samples\userguide\multiproject\dependencies\java\services\personService\src\main cannot be removed because it is not empty. At C:\XXXX\Documents\WindowsPowerShell\Modules\posh-gvm\Commands.ps1:112 char:5

This is due to a bug in -Recurse that doesn't process correctly. A workaround has been offered at StackOverflow: http://stackoverflow.com/questions/1752677/how-to-recursively-delete-an-entire-directory-with-powershell-2-0

flofreud commented 9 years ago

I just tried to reproduce the issue but wasn't able to do it with PowerShell 4.0 on Windows 8.1.

On which plattform did you get the error? Windows 7? Which PowerShell version? You can get the PowerShell version with $PSVersionTable.

I just created a new version with the -Force parameter suggested in the stackoverflow question, because there should be no new issue caused by this. Therefore the issue is possible already fixed.

billjamesdev commented 9 years ago

Sorry I didn't get back right away. The issue was with PowerShell 3.x on Windows 7. Updating PowerShell on my machine fixed it, even prior to updating to the new posh-gvm. Thanks!