altair
altair copied to clipboard
[BUG] Chocolatey package leaves old version shims
Describe the bug
The Chocolatey package leaves old version shims in C:\ProgramData\chocolatey\bin
To Reproduce Steps to reproduce the behavior:
- Install with choco
- Update with choco
- Check
C:\ProgramData\chocolatey\bin
- multiple exes will be there
Expected behavior Only one executable in that dir, preferably without version.
Desktop (please complete the following information):
- OS: Windows
- Browser: -
- Platform: choco
- Version: any
Hey, thanks for raising the issue. Unfortunately I don't know what we need to change to avoid this behavior. I'm open to hear if there's a solution for this though.
Disclaimer: I don't use a windows machine so I haven't experienced this, and have no idea how to even go about it.
https://docs.chocolatey.org/en-us/features/shim should help. It seems that the installer is shimmed. Perhaps using Install-ChocolateyInstallPackage
instead of Install-ChocolateyPackage
is the solution, but I'm not Chocolate expert either.
For referrences:
https://docs.chocolatey.org/en-us/create/functions/install-chocolateyinstallpackage#inputs https://docs.chocolatey.org/en-us/create/functions/install-chocolateypackage
@imolorhe actually, that's not the problem.
Shims aren't documented too well IMO, but here's what happens:
- you're downloading installer to
chocolatey\lib\altair-graphql
kind of folder inchocolateyInstall.ps1
- you're not deleting that installer after it finishes the job
- Chocolatey automatically shims anything in that dir or subdirs after installer script finishes
Possible solutions:
- download the installer somewhere else if it's needed later for any reason (e.g. is it required for uninstalling? no idea)
- delete the installer at the end of install script if it's not needed, so
Remove-Item $fileLocation