Closed jayvdb closed 1 year ago
Hi @jayvdb !
With which version of conan do you experience this issue ?
this was when after using choco to install https://community.chocolatey.org/packages/conan
$ /c/Program\ Files/Conan/conan/conan --version
Conan version 1.50.0
And the 'User Path' of your Windows system doesn't contain the path C:\Program Files/Conan/conan
?
Can the recipe be changed to add Conan to the system path or provide an option to install for all users?
@jayvdb does your problematic matches the one described by @vectorsli ?
@vectorsli If I have understand the documentation of Install-ChocolateyPath
, in #8, I have modified the conan package so that it will modify the PATH associated to the process running the installation. Would that solve your issue ?
@Xav83 Thanks for your response. From my understanding of the documentation, the required "scope" would be Machine
.
📝 NOTE Administrative Access Required when -PathType 'Machine'. https://docs.chocolatey.org/en-us/create/functions/install-chocolateypath
Which means that if I set it to Machine
, everyone using the conan package, and whom don't have the Admin right, won't be able to install/update it.
I suppose that the Process
value allows you to modify the PATH
related to the context from which you run the install/upgrade command.
Doesn't chocolatey complain when it's not running with administrative rights?
Alternatively one could let Chocolatey create a shim for conan.exe
:
https://docs.chocolatey.org/en-us/create/functions/install-binfile
Hi @vectorsli,
To keep you up to date, I have sent a message to the Chocolatey community, on Discord, in order to come up with the better solution for this issue :wink:
So, I have updated the PR #8, to allow the users to to specify, at the installation, the PATH in which they want conan
to be added. On Discord, a member of the Chocolatey community has notified me about this possibility (cf. Chocolatey documentation) and that seems to be the best option in order to allow everyone to customize their installation to meet their need.
@vectorsli, will this solution meet your needs, or do you see any issue with it ? I'll wait for you feedback before integrating the PR :wink:
conan
is installed intoC:\Program Files\Conan\conan
, but that is not added to thePATH
.