(many packages) Set ChocolateyPackageInstallLocation instead of printing out install location #2254
Closed
TheCakeIsNaOH
started this conversation in
Ideas
Replies: 2 comments 6 replies
-
I have no problems with someone wanting to change this and set the |
Beta Was this translation helpful? Give feedback.
3 replies
-
Would this be worth adding as a helper, or a feature to |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Before starting, ensure that you have done the following.
What do you want to add?
There are quite a few packages that use
Get-AppInstallLocation
to find the installation location and thenWrite-Host
the install location if found. Instead of printing out the install location, I suggest switching to setting$env:ChocolateyPackageInstallLocation
, as that way, the software install location is hooked up to the Chocolatey CLI code for printing out the installation location, and for potential automatic uninstall improvements.Here is an example of the current usage:
chocolatey-packages/automatic/git.install/tools/chocolateyInstall.ps1
Lines 29 to 31 in 7c507b8
There appear to be about ~50 or so packages that use approximately this code.
What problem will the feature/enhancement solve?
Currently, for packages that print out the result of
Get-AppInstallLocation
, they generally have redundant outputs that note the install location.For example, on my most recent
git.install
upgrade, thechocolateyInstall.ps1
printed out this line:git.install installed to 'C:\Program Files\Git'
And then close below that, Chocolatey printed out this line:
Software installed to 'C:\Program Files\Git\'
If the feature or enhancement is approved:
Additional Context
https://docs.chocolatey.org/en-us/faqs#the-install-location-displayed-is-incorrect-or-missing
Beta Was this translation helpful? Give feedback.
All reactions