Scoop
Scoop copied to clipboard
[Feature] Do not require -RunAsAdmin in GitHub Actions Runners
Feature Request
Is your feature request related to a problem? Please describe.
Scoop is very powerful (and fast!) for installing build dependencies in GitHub Actions.
However, PowerShell executed in Windows runners in GitHub Actions is run as Administrator.
This results a developer, likely accustomed to using Scoop locally, simply dropping in Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression to return an error about running as Administrator.
The developer must then go back in and add the -RunAsAdmin option to her GitHub Action workflow. This is an added hurdle to using Scoop in GitHub Actions.
The -RunAsAdmin requirement, which makes sense in most scenarios, is not relevant in GitHub Actions.
Describe the solution you'd like
When default GitHub Action environmental variables are present, Scoop disregards the Administrator limitation/-RunAsAdmin requirement.
For example, if GITHUB_ACTIONS and CI are both set to true.
It is very unlikely an Administrator would have environmental variables GITHUB_ACTIONS and CI both set and set to true in a local production environment.
Describe alternatives you've considered
The alternative would be continuing to require -RunAsAdmin in GitHub Actions, which, for reasons detailed above, poses an extra burden on developers moving their builds from local to GitHub Actions.
I have proposed a PR that would address this: https://github.com/ScoopInstaller/Install/pull/77