potatoqualitee / psmodulecache

This action makes caching PowerShell modules from the PowerShell Gallery easy for Linux, Windows and macOS runners.
MIT License
31 stars 12 forks source link

Install modules to the `AllUsers` scope #16

Closed briantist closed 2 years ago

briantist commented 2 years ago

It seems like the action currently writes the modules to the CurrentUser location, but it would be nice to have the module in the AllUsers location, which would cover anything that might be using a different user, running as SYSTEM/root, etc.

For our use case for example, an Ansible collection built around dbatools for managing SQL server, we run Ansible from within WSL1 on the Windows GH runner, and Ansible connects over PS Remoting to the runner, so we create an additional admin user.

It's probably a rare use-case where CurrentUser is not sufficient, but AllUsers shouldn't hinder the regular use cases and adds support for some rare ones.

It could either be the main functionality, or there could be an option, and the default for the option could be either one.

potatoqualitee commented 2 years ago

great idea! i see no reason not to just make it the default 🥳 if anyone has time earlier than I do, i am happy to accept a PR.