fix(scripts): launchers exit with the title's failure, not 0 #94

Merged
Caasares merged 1 commit from upstream-pr/94 into main 2026-11-28 19:01:28 +00:00
Caasares commented 2026-11-27 17:57:39 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Caasares on 2026-11-27T17:57:39Z.


scripts/play-foxhound.ps1 and scripts/play.ps1 always ended with exit code 0. That covers:

  • a title that failed (victory run returned 3 in the check below);
  • a missing -Exe, a missing build, and no cargo to build with (these used a bare return).

Anything that calls the launcher (a script, a scheduled task, CI) cannot tell a failed start from a good one.

Fix

  • The early failures exit 1.
  • After victory run, the launcher exits with victory run's exit code (exit $LASTEXITCODE).

Successful starts still exit 0. PLAY_FRAMEGEN.cmd ends with pause and play-gta6-framegen.ps1 does not forward the code, so the double-click path is unchanged; this only affects callers of play-foxhound.ps1 and play.ps1 directly.

Verification

No automated test covers the scripts, so this was checked with a stand-in victory.exe: a compiled program that exits 3 for a file whose text begins FAIL (a crashing title), and 0 otherwise.

Case Before After
play-foxhound.ps1, title crashes (victory run exit 3) 0 3
play-foxhound.ps1, missing -Exe 0 1
play.ps1, title crashes 0 3
play.ps1, missing -Exe 0 1
title starts and runs 0 0

Both files parse with no errors. No Rust code changed, so the Rust gates are unaffected.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5531010861 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/94). Originally posted by [Caasares](https://github.com/Caasares) on 2026-11-27T17:57:39Z. --- `scripts/play-foxhound.ps1` and `scripts/play.ps1` always ended with exit code 0. That covers: - a title that failed (`victory run` returned 3 in the check below); - a missing `-Exe`, a missing build, and no `cargo` to build with (these used a bare `return`). Anything that calls the launcher (a script, a scheduled task, CI) cannot tell a failed start from a good one. ### Fix - The early failures `exit 1`. - After `victory run`, the launcher exits with `victory run`'s exit code (`exit $LASTEXITCODE`). Successful starts still exit 0. `PLAY_FRAMEGEN.cmd` ends with `pause` and `play-gta6-framegen.ps1` does not forward the code, so the double-click path is unchanged; this only affects callers of `play-foxhound.ps1` and `play.ps1` directly. ### Verification No automated test covers the scripts, so this was checked with a stand-in `victory.exe`: a compiled program that exits 3 for a file whose text begins `FAIL` (a crashing title), and 0 otherwise. | Case | Before | After | |---|---|---| | `play-foxhound.ps1`, title crashes (`victory run` exit 3) | 0 | 3 | | `play-foxhound.ps1`, missing `-Exe` | 0 | 1 | | `play.ps1`, title crashes | 0 | 3 | | `play.ps1`, missing `-Exe` | 0 | 1 | | title starts and runs | 0 | 0 | Both files parse with no errors. No Rust code changed, so the Rust gates are unaffected.
1tsethan commented 2026-11-27 23:01:20 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by 1tsethan on 2026-11-27T23:01:20Z.


Tested PR commit: 4b8219d9d2ba25e6daaa067f62360429f0c46098.

With an authored stub executable exiting 7, scripts/play-foxhound.ps1 on main df2daaf returned 0, while this PR returned 7. The test used a private fixture directory and Windows PowerShell 5.1; no game executable was run.

Verified independently with OpenAI Codex assistance. No gameplay or performance claims.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7229807643 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/94#issuecomment-7229807643). Originally posted by [1tsethan](https://github.com/1tsethan) on 2026-11-27T23:01:20Z. --- Tested PR commit: `4b8219d9d2ba25e6daaa067f62360429f0c46098`. With an authored stub executable exiting 7, `scripts/play-foxhound.ps1` on main df2daaf returned 0, while this PR returned 7. The test used a private fixture directory and Windows PowerShell 5.1; no game executable was run. Verified independently with OpenAI Codex assistance. No gameplay or performance claims. <!-- victory-native-validation-20261128 -->
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
trustno1-coder/VIctory-NVIDIA!94
No description provided.