From 57cbf941c8b88e4f3825e2e9b70896ceebe2be1d Mon Sep 17 00:00:00 2001 From: b84330808 Date: Fri, 13 Nov 2026 13:37:49 +0900 Subject: [PATCH] Fix install.ps1 aborting on conda/pip warnings in Windows PowerShell 5.1 install.ps1 runs with $ErrorActionPreference = 'Stop' and captures conda and pip output with 2>&1. Windows PowerShell 5.1 turns every stderr line of a native command into an error record, so the first warning (a conda FutureWarning, pip's "[notice] A new release of pip is available") ends the script even though the command succeeded. Use 'Continue' inside Invoke-Conda and Invoke-Pip so only the exit code decides. Real failures still throw and stop the script. Fixes #2757 --- install.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install.ps1 b/install.ps1 index 7017524f..10184b7a 100644 --- a/install.ps1 +++ b/install.ps1 @@ -52,6 +52,9 @@ function Invoke-Conda { [string[]]$Args ) + # Windows PowerShell 5.1 turns stderr lines into errors, so under 'Stop' a mere warning + # would end the script. The exit code below decides success. + $ErrorActionPreference = 'Continue' $output = & conda install -y -q -c conda-forge @Args 2>&1 $exitCode = $LASTEXITCODE @@ -79,6 +82,9 @@ function Invoke-Pip { [string[]]$Args ) + # Windows PowerShell 5.1 turns stderr lines into errors, so under 'Stop' a mere warning + # would end the script. The exit code below decides success. + $ErrorActionPreference = 'Continue' $output = & pip install @Args 2>&1 $exitCode = $LASTEXITCODE