`choco config`: Please allow to configure the ToolsLocation
N/A: Why it's not applicable
Is Your Feature Request Related To A Problem? Please describe.
It looks like Get-ToolsLocation always defaults to c:\Tools in a new choco session 😞.
Yes, it's a problem:
- There are reasons, when
c:\Toolscannot be used, for example:- if this Directory is already reserved and used e.g. by a project
- if the Company policy requests to always install Chocolatey Packages into a specific folder (because e.g. it has higher security risks)
- …
- it's a problem because choco does not work intuitive / as expected 😞, for example:
- If the IT sets up a computer and installs all company choco packages into e.g.
c:\bin-choco - Then one expects that every further call of
choco installwill work with the directory again - So if a user uses
choco installagain three months after the IT departement, the packages are distributed toc:\toolsandc:\bin-choco😢
- If the IT sets up a computer and installs all company choco packages into e.g.
Describe The Solution. Why is it needed?
Please:
- Allow us to use something like:
choco config set --name toolsLocation --value=…to make this setting persistent - Describe how to use the Tools-Location (not only how to read the location, but also how to set this config in choco!) Docs: path-provided-by-the-get-toolslocation-helper
- Then,
choco installalways uses this configuration until it gets changed (of course 😀)
Additional Context.
N/A
Related Issues
N/A
According to the docs you can set this in an environment variable. Are you not seeing this environment variable being used by the helper function?
Edit: I missed that you had basically referenced that, so I guess then the question being asked is how to set the environment variable? If that's the case, you can set the environment variable in the system control panel (or just use windows search to find the environment variable interface). Just add an appropriately named environment variable, if desired reboot the system, then everything should be set to use the newly configured location.
@schittli did the previous comment provide an answer?
As there has been no update to this, I'm going to go ahead and close this issue, but we can reopen it if necessary.