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:
Travis Plunk
2017-12-11 10:28:43 -08:00
committed by GitHub
parent 4edfebd69f
commit 2a9c1cad00
+2 -2
View File
@@ -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