choco icon indicating copy to clipboard operation
choco copied to clipboard

`choco config`: Please allow to configure the ToolsLocation

Open schittli opened this issue 3 years ago • 2 comments

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:\Tools cannot 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 install will work with the directory again
    • So if a user uses choco install again three months after the IT departement, the packages are distributed to c:\tools and c:\bin-choco 😢

Describe The Solution. Why is it needed?

Please:

  1. Allow us to use something like: choco config set --name toolsLocation --value=… to make this setting persistent
  2. 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
  3. Then, choco install always uses this configuration until it gets changed (of course 😀)

Additional Context.

N/A

Related Issues

N/A

schittli avatar Jul 31 '22 19:07 schittli

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.

corbob avatar Jul 31 '22 20:07 corbob

@schittli did the previous comment provide an answer?

TheCakeIsNaOH avatar Aug 08 '22 13:08 TheCakeIsNaOH

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.

pauby avatar Aug 17 '22 14:08 pauby