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

[Feature] Do not require -RunAsAdmin in GitHub Actions Runners #5800

Closed
sirredbeard opened this issue Feb 6, 2024 · 1 comment
Closed

[Feature] Do not require -RunAsAdmin in GitHub Actions Runners #5800

sirredbeard opened this issue Feb 6, 2024 · 1 comment

Comments

@sirredbeard
Copy link

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.

@sirredbeard
Copy link
Author

I have proposed a PR that would address this: ScoopInstaller/Install#77

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