-
Notifications
You must be signed in to change notification settings - Fork 160
Open
Labels
Issue-FeatureNew feature or request. Complex enough to require planning and actual budgeted, scheduled work.New feature or request. Complex enough to require planning and actual budgeted, scheduled work.Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meetingIt's a new issue that the core contributor team needs to triage at the next triage meeting
Description
Description of the new feature / enhancement
Could you please add new is-elevated command.
It should check for elevated permissions and return 0 if process is already elevated.
sudo is-elevated && echo Already elevatedScenario when this would be used?
This is useful feature and can be used in many scenarios.
For example if will allow to create self-elevated scripts:
test.cmd:
:: check for elevated permissions
:: - if already elevated - continue run
:: - if NOT elevated - elevate myself, run and exit
sudo is-elevated || ( sudo -E "%~sf0" %* & exit /B )
echo Run elevated code hereSupporting information
No response
Metadata
Metadata
Assignees
Labels
Issue-FeatureNew feature or request. Complex enough to require planning and actual budgeted, scheduled work.New feature or request. Complex enough to require planning and actual budgeted, scheduled work.Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meetingIt's a new issue that the core contributor team needs to triage at the next triage meeting