From b092bcefe1bdd42c785cbb0a2571323e0d8b62fb Mon Sep 17 00:00:00 2001 From: Howard Wu <40033067+Howard20181@users.noreply.github.com> Date: Wed, 5 Oct 2022 22:20:14 +0800 Subject: [PATCH] Update build.sh Unable to detect if it is in Windows terminal --- scripts/build.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index ee30c0b..8b143f4 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -685,8 +685,6 @@ function Test-Administrator { } } -function Test-WindowsTerminal { test-path env:WT_SESSION } - function Get-InstalledDependencyVersion { param ( [string]\$Name, @@ -703,7 +701,7 @@ function Finish { Start-Process "wsa://com.android.vending" } -If (-Not (Test-Administrator) -Or (Test-WindowsTerminal)) { +If (-Not (Test-Administrator)) { Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Bypass -Force \$proc = Start-Process -PassThru -WindowStyle Hidden -Verb RunAs ConHost.exe -Args "powershell -ExecutionPolicy Bypass -Command Set-Location '\$PSScriptRoot'; &'\$PSCommandPath' EVAL" \$proc.WaitForExit()