From a74cb8b94e3b4c678a402ce882543b8aa5c8f9fa Mon Sep 17 00:00:00 2001 From: LeoBorcherding Date: Wed, 6 May 2026 18:12:42 -0500 Subject: [PATCH] fix: expand ROCm wheel array to scalars for Invoke-InstallCommand @array splatting inside a scriptblock only works when the native command is prefixed with '&'. Invoke-InstallCommand uses '& $Command' to run the block, so @ROCmAllWheelUrls was not being expanded. Extract to scalar variables $rw0-$rw4 which are captured correctly by the closure. --- install.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install.ps1 b/install.ps1 index cad8734bb8..2563ddffae 100644 --- a/install.ps1 +++ b/install.ps1 @@ -1440,7 +1440,12 @@ shell.Run cmd, 0, False } elseif ($ROCmTorchWheelUrl) { Write-TauriLog "STEP" "Installing PyTorch (AMD ROCm Windows)" substep "installing PyTorch (AMD ROCm $ROCmVersion)..." - $torchInstallExit = Invoke-InstallCommand { uv pip install --python $VenvPython --force-reinstall --no-cache-dir @ROCmAllWheelUrls } + # Expand array to scalars — @array splatting requires & and doesn't + # work reliably inside scriptblocks passed to Invoke-InstallCommand. + $rw0 = $ROCmAllWheelUrls[0]; $rw1 = $ROCmAllWheelUrls[1] + $rw2 = $ROCmAllWheelUrls[2]; $rw3 = $ROCmAllWheelUrls[3] + $rw4 = $ROCmAllWheelUrls[4] + $torchInstallExit = Invoke-InstallCommand { uv pip install --python $VenvPython --force-reinstall --no-cache-dir $rw0 $rw1 $rw2 $rw3 $rw4 } if ($torchInstallExit -ne 0) { Write-Host "[ERROR] Failed to install AMD ROCm PyTorch (exit code $torchInstallExit)" -ForegroundColor Red return (Exit-InstallFailure "Failed to install AMD ROCm PyTorch (exit code $torchInstallExit)" $torchInstallExit)