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

Open
github-bot wants to merge 1 commit from github-bot/gh-94 into main AGit
Owner

@⁠Caasares on GitHub · 2026-11-27 17:57 UTC · original
Caasares:fix/app-launcher-exit-code → main · +8 −5 · 2 files · 1 commits · open

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.

**@⁠Caasares** on GitHub · 2026-11-27 17:57 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/94) `Caasares:fix/app-launcher-exit-code` → `main` · +8 −5 · 2 files · 1 commits · open `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.
play-foxhound.ps1 and play.ps1 ended with exit code 0 whatever happened: a
title that crashed (victory run returned 3), a missing executable, a missing
build or a missing cargo. Anything that calls them (a script, a task, CI)
could not tell a failed start from a good one. Exit 1 on the early failures
and pass victory run's exit code through.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 18:00:03 +00:00
Author
Owner

@⁠1tsethan on GitHub · 2026-11-27 23:01 UTC · original

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.

**@⁠1tsethan** on GitHub · 2026-11-27 23:01 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/94#issuecomment-7229807643) 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 -->
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/94/head:github-bot/gh-94'
git switch 'github-bot/gh-94'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-94'
git switch 'github-bot/gh-94'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-94'
git switch 'github-bot/gh-94'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-94'
git switch 'main'
git merge --squash 'github-bot/gh-94'
git switch 'main'
git merge --ff-only 'github-bot/gh-94'
git switch 'main'
git merge 'github-bot/gh-94'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.