lancer_victory.ps1 dies on benign cargo stderr warnings under Windows PowerShell 5.1 when stderr is redirected #233
Labels
No labels
accessibility
bloqué : binaire console
bug
chargeur
console-dll
cpu
documentation
duplicate
enhancement
good first issue
gpu
help wanted
invalid
performance
question
runtime-gdk
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LooperSalty--AnyXboxX#233
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@PeppeBeard on GitHub · 2026-11-25 20:09 UTC · original
Summary
tools/lancer_victory.ps1terminates during the cargo build step under Windows PowerShell 5.1 when stderr is redirected (2> victory.log), even though nothing has failed. The same command runs fine under PowerShell 7 (pwsh).Environment
powershell.exe) → failspwsh) → worksmainof this repository, built 2026-11-25Reproduction
Following the documented measurement workflow from
docs/running-gta6.md:under
powershell.exe(5.1), with the VIctory build not yet current (so cargo emits output). Output:(The
FullyQualifiedErrorIdabove is paraphrased from my console; the mechanism is the part that matters.)Running the same command under
pwshinstead succeeds; the diag profile build (victory.exe) completes and lands inthird_party\victory\target\diag\.Root cause (as I understand it)
$ErrorActionPreference = 'Stop'at the top.2>), PowerShell wraps each stderr line into anErrorRecord(NativeCommandError).cargowrites a benign warning to stderr (here: a deprecation notice coming from third_party/tombox code,fetch_update→try_update, triggered by the new Rust 1.100).$ErrorActionPreference = 'Stop'promotes that record into a terminating error at the& cargo buildline — before the game ever starts.So it is nondeterministic from the user's point of view: it only fires when cargo happens to emit stderr output, which depends on toolchain version and warnings present. Same command can pass one day and die the next.
Suggested fix directions
cmd /c "cargo build ... 2>&1"), or$ErrorActionPreferencearound the native calls in the script, orpwshas the required shell indocs/running-gta6.mduntil the script handles 5.1.Happy to test a patch on 5.1 and 7 if useful — the repro here is 100% on demand.