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

Elevated Privileges / Sudo mode per command #1278

Open
boukeversteegh opened this issue Jul 24, 2023 · 1 comment
Open

Elevated Privileges / Sudo mode per command #1278

boukeversteegh opened this issue Jul 24, 2023 · 1 comment
Labels
state: needs triage Waiting to be triaged by a maintainer.

Comments

@boukeversteegh
Copy link

boukeversteegh commented Jul 24, 2023

I would like a command to run in sudo mode (unix) or as Administrator (windows).

Use case: Defining the install commands for a flutter project.

On windows, it requires installing fvm. The recommended method is to use choco install fvm, which must be run as a Administrator on windows.

The current work-around would be to open a terminal as adminstrator, and run everything as admin (not so safe, and may have side-effects). The better solution would be to automatically 'elevate' for the commands that need it.

tasks:
  install:fvm:
    cmds:
      - cmd: choco install fvm -y
        platforms: [windows]
        sudo: true # <-- opens a UAC dialog to elevate privileges, then runs the command
      - cmd: brew tap leoafarias/fvm
        platforms: [darwin]
      - cmd: brew install fvm
        platforms: [darwin]

If the maintainers think this is a useful feature, I'm interested in implementing it.

@task-bot task-bot added the state: needs triage Waiting to be triaged by a maintainer. label Jul 24, 2023
@ccxuy
Copy link

ccxuy commented Aug 20, 2024

ping, maybe this could be achived by #448

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: needs triage Waiting to be triaged by a maintainer.
Projects
None yet
Development

No branches or pull requests

3 participants