diff --git a/tools/installpsh-debian.sh b/tools/installpsh-debian.sh index 972cd187b2..83f27c93e7 100755 --- a/tools/installpsh-debian.sh +++ b/tools/installpsh-debian.sh @@ -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