From 90f601d4a2ad22276d2459b1ab3bdf9734047fb2 Mon Sep 17 00:00:00 2001 From: LoveSy Date: Tue, 1 Feb 2022 10:18:53 +0800 Subject: [PATCH] Support path with spaces Fix #206 --- .github/workflows/magisk.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/magisk.yml b/.github/workflows/magisk.yml index 24f79b0..5341d77 100644 --- a/.github/workflows/magisk.yml +++ b/.github/workflows/magisk.yml @@ -437,7 +437,7 @@ jobs: } if (-not (Test-Administrator)) { - \$proc = Start-Process -PassThru -WindowStyle Hidden -Verb RunAs powershell.exe -Args "-executionpolicy bypass -command Set-Location \`"\$PSScriptRoot\`"; \`"\$PSCommandPath\`" EVAL" + \$proc = Start-Process -PassThru -WindowStyle Hidden -Verb RunAs powershell.exe -Args "-executionpolicy bypass -command Set-Location '\$PSScriptRoot'; &'\$PSCommandPath' EVAL" \$proc.WaitForExit() if (\$proc.ExitCode -ne 0) { Clear-Host @@ -447,7 +447,7 @@ jobs: exit } elseif ((\$args.Count -eq 1) -and (\$args[0] -eq "EVAL")) { - Start-Process powershell.exe -Args "-executionpolicy bypass -command Set-Location \`"\$PSScriptRoot\`"; \`"\$PSCommandPath\`"" + Start-Process powershell.exe -Args "-executionpolicy bypass -command Set-Location '\$PSScriptRoot'; &'\$PSCommandPath'" exit }