mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
tools: enable install-debian to work with VSTS Hosted Linux Preview (#5659)
Added -skip-sudo-check, because the check fails in VSTS Hosted Linux Preview even though sudo works.
This commit is contained in:
@@ -14,10 +14,10 @@
|
||||
#Switches
|
||||
# -includeide - the script is being run headless, do not perform actions that require response from the console
|
||||
# -interactivetests - requires a human user in front of the machine - loads a script into the ide to test with F5 to ensure the IDE can run scripts
|
||||
# -skip-sudo-check - skips the check that the user has permission to use sudo. This is required to run in the VSTS Hosted Linux Preview.
|
||||
|
||||
#gitrepo paths are overrideable to run from your own fork or branch for testing or private distribution
|
||||
|
||||
|
||||
VERSION="1.1.2"
|
||||
gitreposubpath="PowerShell/PowerShell/master"
|
||||
gitreposcriptroot="https://raw.githubusercontent.com/$gitreposubpath/tools"
|
||||
@@ -94,7 +94,7 @@ if (( $EUID != 0 )); then
|
||||
fi
|
||||
|
||||
#Check that sudo is available
|
||||
if [[ "$SUDO" -eq "sudo" ]]; then
|
||||
if [[ "$SUDO" -eq "sudo" && ! ("'$*'" =~ skip-sudo-check) ]]; then
|
||||
|
||||
$SUDO -v
|
||||
if [ $? -ne 0 ]; then
|
||||
|
||||
Reference in New Issue
Block a user