From e68e190ff37452328a84d9948b27ee8c60a2c2d3 Mon Sep 17 00:00:00 2001 From: Gabi <182965942+GabiNun@users.noreply.github.com> Date: Tue, 10 Feb 2026 21:19:46 +0200 Subject: [PATCH] Update-Compile (#3922) * Update Compile.ps1 * Update Compile.ps1 * Update Compile.ps1 * Update Compile.ps1 * Update Compile.ps1 * Update Compile.ps1 --- Compile.ps1 | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/Compile.ps1 b/Compile.ps1 index cda56803..bd6e6593 100644 --- a/Compile.ps1 +++ b/Compile.ps1 @@ -12,12 +12,8 @@ $OFS = "`r`n" $scriptname = "winutil.ps1" $workingdir = $PSScriptRoot -Push-Location -Set-Location $workingdir - # Variable to sync between runspaces $sync = [Hashtable]::Synchronized(@{}) -$sync.PSScriptRoot = $workingdir $sync.configs = @{} function Update-Progress { @@ -132,19 +128,12 @@ try { } catch { Write-Warning "Syntax Validation for 'winutil.ps1' has failed" Write-Host "$($Error[0])" -ForegroundColor Red - Pop-Location # Restore previous location before exiting... exit 1 } Write-Progress -Activity "Validating" -Completed if ($run) { - $script = "& '$workingdir\$scriptname' $Arguments" - - $powershellcmd = if (Get-Command pwsh -ErrorAction SilentlyContinue) { "pwsh" } else { "powershell" } - $processCmd = if (Get-Command wt.exe -ErrorAction SilentlyContinue) { "wt.exe" } else { $powershellcmd } - - Start-Process $processCmd -ArgumentList "$powershellcmd -NoProfile -Command $script" - + Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass + .\Winutil.ps1 $Arguments break } -Pop-Location