Open ferventcoder opened 8 years ago
We collided into this yesterday and found that discussion, which took me here. I was about to open an issue otherwise.
I am unzipping into Program Files instead of ProgramData. I concede that's kind of gross, but was recommended of the group creating the original collateral; the program doesn't mess with the registry, but normally installs to Program Files. It requires a license key that I cannot automate so they recommended I just zip up the mess for distribution for our internal repository. Such is life.
What I had to do was exploit the zipFileName parameter in a gross way:
$derpyInstallPath = "{0}install.zip" -f $packageName
Uninstall-ChocolateyZipPackage -packageName $packageName -zipFileName $derpyInstallPath
That constructs the appropriate path to the install.zip.txt file. After that, my stuff got cleaned up properly.
I saw the code for Uninstall-ChocolateyZipPackage and was thinking that this wouldn't be too hard to deal with but realized there would probably be secondary, whack-a-mole effects for how it performs by default when just using ProgramData.
I wanted to double-check that all the tags are still relevant. This is a roundabout way of me asking if anything was ever done about this. ;)
I would suggest this behaviour needs to be fixed rather than document it.
Unless there is a good reason that the Install
text is added to the filename, I'd suggest we stop using it. So when somebody passes package.zip
we search for packageInstall.zip.txt
(which works for existing uses) and then package.zip.txt
. Only if both of those cannot be found do we fail.
This was taken from a message in Google Groups: