Skip to content
This repository has been archived by the owner on Feb 19, 2019. It is now read-only.

Fix bash arg quoting, remove bash/batch shortcuts on uninstall #258

Closed
wants to merge 2 commits into from

Conversation

aflatt
Copy link

@aflatt aflatt commented Mar 20, 2013

Put quotes around the args passed to the bash shell script (without quotes spaces in the args will not work)

When a Chocolatey-Uninstall is done, the bash and batch shortcuts will now be removed using Remove-BinFile

I've also added a message in Generate-BinFile that the bash shortcut is getting added, as this was missing.

I've also added a message to Chocolatey-Uninstall describing which directory is removed on uninstall.

When a Chocolatey-Uninstall is done, the bash and batch shortcuts will
now be removed using Remove-BinFile

I've also added a message in Generate-BinFile that the bash shortcut is
getting added, as this was missing.

I've also added a message to Chocolatey-Uninstall describing which
directory is removed on uninstall.
@@ -11,6 +11,7 @@ param(
$path = $path.ToLower().Replace($nugetPath.ToLower(), "%DIR%..\").Replace("\\","\")
$pathBash = $path.Replace("%DIR%..\","`$DIR/../").Replace("\","/")
Write-Host "Adding $packageBatchFileName and pointing to `'$path`'." -ForegroundColor $Note
Write-Host "Adding $packageBashFileName and pointing to `'$path`'." -ForegroundColor $Note
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this line, because the existing code seemed inconsistent (it displays a message about the batch file, but not about the bash file)

When the args contain spaces, the existing shell script would fail.
If we quote the args this will fix the problem
@ghost ghost assigned ferventcoder Apr 26, 2013
@ferventcoder
Copy link
Contributor

This is in. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants