-
-
Notifications
You must be signed in to change notification settings - Fork 763
Open
Description
Description
It would be convenient to be able to run a specific task / included taskfile, as a distinct user: e.g. when using Homebrew in a multi-user environment, it must be invoked with its "owning" user, that definitely is distinct from the current one (according to the Homebrew's recommendation in this context).
I didn't find any previous request for such feature; I hope I didn't miss it.
This can already be achieved through
version: 3
vars:
USER:
sh: echo ${USER:-$(whoami)}
tasks:
target:
cmds:
- sudo --login --user={{.USER}} command0
- ...
- sudo --login --user={{.USER}} commandNbut rapidly becomes cumbersome with lots of tasks / commands; such a syntax would be of a great help for readability and maintainability:
tasks:
target:
as: {{.USER}}
cmds:
- command0
- ...
- commandNmybigman
Metadata
Metadata
Assignees
Labels
No labels