mirror of
https://github.com/MustardChef/WSABuilds.git
synced 2024-11-27 05:34:16 +01:00
Update build.sh
Unable to detect if it is in Windows terminal
This commit is contained in:
parent
97dba57d42
commit
b092bcefe1
@ -685,8 +685,6 @@ function Test-Administrator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function Test-WindowsTerminal { test-path env:WT_SESSION }
|
|
||||||
|
|
||||||
function Get-InstalledDependencyVersion {
|
function Get-InstalledDependencyVersion {
|
||||||
param (
|
param (
|
||||||
[string]\$Name,
|
[string]\$Name,
|
||||||
@ -703,7 +701,7 @@ function Finish {
|
|||||||
Start-Process "wsa://com.android.vending"
|
Start-Process "wsa://com.android.vending"
|
||||||
}
|
}
|
||||||
|
|
||||||
If (-Not (Test-Administrator) -Or (Test-WindowsTerminal)) {
|
If (-Not (Test-Administrator)) {
|
||||||
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Bypass -Force
|
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 = Start-Process -PassThru -WindowStyle Hidden -Verb RunAs ConHost.exe -Args "powershell -ExecutionPolicy Bypass -Command Set-Location '\$PSScriptRoot'; &'\$PSCommandPath' EVAL"
|
||||||
\$proc.WaitForExit()
|
\$proc.WaitForExit()
|
||||||
|
Loading…
Reference in New Issue
Block a user