fix(sudo): always create sudo.cmd in Windows user's home directory

This commit is contained in:
AJ ONeal
2023-10-28 07:15:54 +00:00
parent a22af8815e
commit 30f161f032

View File

@@ -3,7 +3,7 @@
Write-Output "Installing sudo.cmd..."
# Couldn't figure out how to get this to work with "here strings", so forgive the ugly, but at least it works
Set-Content -Path .local\bin\sudo.cmd -Value "@echo off`r`npowershell -Command ""Start-Process cmd -Verb RunAs -ArgumentList '/c cd /d %CD% && %*'""`r`n@echo on"
Set-Content -Path "$Env:USERPROFILE\.local\bin\sudo.cmd" -Value "@echo off`r`npowershell -Command ""Start-Process cmd -Verb RunAs -ArgumentList '/c cd /d %CD% && %*'""`r`n@echo on"
Write-Output "Installed to '$Env:USERPROFILE\.local\bin\sudo.cmd'"
Write-Output ""