-
Notifications
You must be signed in to change notification settings - Fork 905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Powershell functions: Allow access to package title, not only ID #925
Comments
Sure, sounds good. Perhaps make other items available as well? |
Some times the title of the package must be presented to the user in a "pretty" matter. The Package Id helps, but is not "GUI-friendly". To avoid the need to parse the Id ourselves, this adds the access to the package title as an environment variable.
I decided to just take the variable I am looking for. I like to not introduce code before I actually need it 😄 Hope that is ok! |
Could it be a PowerShell variable, not an environment variable? Adding more and more env vars pollutes the environment and increases memory consumption of every proces started by choco during package installation (and on Windows XP there is a limit for the size of the environment block). |
Additionally, one PowerShell variable could store an object with several properties describing the package, making the interface cleaner (one variable instead of many) and easier to extend (just add a property to the object). |
Yeah the thought has struck me that environment variables might not be the most effective way here. Rewriting it will take some more effort and knowledge about the code, so I will leave that to @ferventcoder! |
I'm concerned because once something is added and documented as public interface it is most likely to stick forever, as changing it will break packages that started depending on it. That's why I'd like to see it done the more desired way from the beginning. |
Yeah, I am just "adding to the pattern" if you will, but that is how I found the code. We have already used some of these variables in a lot of packages, so it would be a breaking change. Doesn't mean that it should not be done, but a rewrite should be signaled with a obsolete-tag or something like that. Again, I leave this for @ferventcoder! |
Some times the title of the package must be presented to the user in a "pretty" matter. The Package Id helps, but is not "GUI-friendly". To avoid the need to parse the Id ourselves, this adds the access to the package title as an environment variable.
Some times the title of the package must be presented to the user in a "pretty" matter. The Package Id helps, but is not "GUI-friendly". To avoid the need to parse the Id ourselves, this adds the access to the package title as an environment variable.
Some times the title of the package must be presented to the user in a "pretty" matter. The Package Id helps, but is not "GUI-friendly". To avoid the need to parse the Id ourselves, this adds the access to the package title as an environment variable.
* pr928: (GH-925) Make package title available to $env
This will be released with 0.10.1. Thanks! |
Small issue, but here goes:
In the environment variables available from the
ChocolateyInstall.ps1
scripts we get access to the package ID and version. In some cases the title of the package is also usefull - especially if it will be presented a little nicer for the user.Example:
When adding packages to the registry to uninstall from "Add / Remove programs" - dialogue in Windows is best to give the title of the package, not just the id. It looks better for the user.
I propose a chocolateyPackageTitle variable or similar.
Any thoughts?
The text was updated successfully, but these errors were encountered: