Add help message for installing without sudo and admin rights

This commit is contained in:
Bernd Verst 2021-07-09 15:31:07 -07:00
parent 2a7f1e2c05
commit 74fa15fb0d
2 changed files with 5 additions and 1 deletions

View File

@ -56,6 +56,7 @@ else {
Write-Output "Creating $DaprRoot directory"
New-Item -ErrorAction Ignore -Path $DaprRoot -ItemType "directory"
if (!(Test-Path $DaprRoot -PathType Container)) {
Write-Warning "Please visit https://docs.dapr.io/getting-started/install-dapr-cli/ for instructions on how to install without admin rights."
throw "Cannot create $DaprRoot"
}

View File

@ -69,7 +69,10 @@ runAsRoot() {
CMD="sudo $CMD"
fi
$CMD
$CMD || {
echo "Please visit https://docs.dapr.io/getting-started/install-dapr-cli/ for instructions on how to install without sudo."
exit 1
}
}
checkHttpRequestCLI() {