Skip to content
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

Install-ChocolateyPath: should -Scope default to 'Machine' #3448

Open
2 tasks done
vexx32 opened this issue May 21, 2024 · 0 comments
Open
2 tasks done

Install-ChocolateyPath: should -Scope default to 'Machine' #3448

vexx32 opened this issue May 21, 2024 · 0 comments

Comments

@vexx32
Copy link
Member

vexx32 commented May 21, 2024

Checklist

  • I have verified this is the correct repository for opening this issue.
  • I have verified no other issues exist related to my request.

Is Your Feature Request Related To A Problem? Please describe.

Packages that don't specify a -Scope for Install-ChocolateyPath will default to User scope, even if choco is running as admin (which is our primary supported use case).

Describe The Solution. Why is it needed?

Packages installing software system-wide (as is our often expected use case) may wind up putting values in the user PATH instead if the package maintainers aren't sufficiently aware / heeding documentation on what the defaults are. This could potentially result in packages not working as expected in a multi-user system, and is reasonably non-trivial to see where the fault might lie.

Some options:

  • Since choco's expected use case is admin/elevated installations, we should default to Machine all the time
  • We could make the default dependent on whether choco is running as admin? if in non admin, default to User scope, otherwise default to Machine
  • No change, keep it defaulting to User scope
  • Make it a mandatory parameter so maintainers have to specify the scope when using Install/Uninstall-ChocolateyPath in their packages.

Additional Context

No response

Related Issues

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant