From 7728d1906cb923c005e04960adfd78a5931a7a47 Mon Sep 17 00:00:00 2001 From: Ryongen Date: Tue, 24 Nov 2026 02:14:07 +0100 Subject: [PATCH] Scripts: smoke.ps1 finds xcl.exe on Windows PowerShell 5.1 PowerShell 5.1 leaves $PSScriptRoot empty while parameter defaults are evaluated, so the script failed unless -Xcl was given. --- scripts/smoke.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/smoke.ps1 b/scripts/smoke.ps1 index f0738cdb9..ee1cd2806 100644 --- a/scripts/smoke.ps1 +++ b/scripts/smoke.ps1 @@ -8,9 +8,11 @@ param( [Parameter(Mandatory = $true)][string]$Game, [int]$Seconds = 60, - [string]$Xcl = (Join-Path $PSScriptRoot '..\target\release\xcl.exe') + [string]$Xcl ) $ErrorActionPreference = 'Stop' +# Windows PowerShell 5.1 leaves $PSScriptRoot empty while param defaults are evaluated. +if (-not $Xcl) { $Xcl = Join-Path $PSScriptRoot '..\target\release\xcl.exe' } if (-not (Test-Path $Xcl)) { throw "no $Xcl - build it first (cargo build --release -p xcl)" } $root = Split-Path $PSScriptRoot -Parent