play: a --set entry loses the pair of quotes no shell took off (some sixty switches ignored in #4392, #4564) #4632

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

@⁠tyr0nsur on GitHub · 2026-12-01 00:22 UTC · original
tyr0nsur:claude/set-strips-shell-quotes → main · +35 −2 · 1 files · 1 commits · open

Relates to #4393 and #4565.

What it changes

A launcher that starts victory.exe without a shell passes --set 'VICTORY_X=1' with the quotes still on. Split as it came, the switch was named 'VICTORY_X and its value was 1'. Windows set a variable no code reads, and the switch did nothing. The play logs of #4393 (RTX 5060) and #4565 carry some sixty switches each that way, all of them ignored, from 'VICTORY_TEXTURE_DROP_MIPS=2' and 'VICTORY_NULL_COLOR=grey' to 'VICTORY_AMBIENT=0.8':

# console=series-s build=release switches: ... 'VICTORY_AMBIENT=0.8' 'VICTORY_AMBIENT_AIR=1.5' ... 'VICTORY_WINDOW_IDLE_MS=2500' ...

F1's restart goes through PowerShell, which takes the quotes off, so this comes from the launchers people use, not from victory.exe itself.

  • unquoted() takes off one matching pair of ' or " around the whole entry before it is split. Quotes inside an entry (a path's) and an unmatched quote are left as they are.
  • restart_args quotes the cleaned entry once, so a restart from F1 doesn't carry the stray pair either.

How it was tested

  • New test set_entries_lose_the_quotes_no_shell_took_off: single- and double-quoted entries are set under their own names, a path's quotes are kept, an unmatched quote is left alone, and the restart line quotes the entry once.
  • cargo test -p victory --locked: 92 + 1 + 2 passed. cargo clippy -p victory --all-targets, with and without --all-features, -D warnings: clean.
  • GPU-independent.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #4627 (play also names switches no code reads). It would not have caught these, since a name starting with a quote isn't a VICTORY_ name, so this fixes the cause instead.

🤖 Generated with Claude Code

**@⁠tyr0nsur** on GitHub · 2026-12-01 00:22 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4631) `tyr0nsur:claude/set-strips-shell-quotes` → `main` · +35 −2 · 1 files · 1 commits · open Relates to #4393 and #4565. ## What it changes A launcher that starts `victory.exe` without a shell passes `--set 'VICTORY_X=1'` with the quotes still on. Split as it came, the switch was named `'VICTORY_X` and its value was `1'`. Windows set a variable no code reads, and the switch did nothing. The play logs of #4393 (RTX 5060) and #4565 carry some sixty switches each that way, all of them ignored, from `'VICTORY_TEXTURE_DROP_MIPS=2'` and `'VICTORY_NULL_COLOR=grey'` to `'VICTORY_AMBIENT=0.8'`: ``` # console=series-s build=release switches: ... 'VICTORY_AMBIENT=0.8' 'VICTORY_AMBIENT_AIR=1.5' ... 'VICTORY_WINDOW_IDLE_MS=2500' ... ``` `F1`'s restart goes through PowerShell, which takes the quotes off, so this comes from the launchers people use, not from `victory.exe` itself. - `unquoted()` takes off one matching pair of `'` or `"` around the whole entry before it is split. Quotes inside an entry (a path's) and an unmatched quote are left as they are. - `restart_args` quotes the cleaned entry once, so a restart from F1 doesn't carry the stray pair either. ## How it was tested - New test `set_entries_lose_the_quotes_no_shell_took_off`: single- and double-quoted entries are set under their own names, a path's quotes are kept, an unmatched quote is left alone, and the restart line quotes the entry once. - `cargo test -p victory --locked`: 92 + 1 + 2 passed. `cargo clippy -p victory --all-targets`, with and without `--all-features`, `-D warnings`: clean. - GPU-independent. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #4627 (`play` also names switches no code reads). It would not have caught these, since a name starting with a quote isn't a `VICTORY_` name, so this fixes the cause instead. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A launcher that starts victory.exe without a shell passes --set
'VICTORY_X=1' with its quotes: split as it came, the switch was named
'VICTORY_X and its value was 1', Windows set a variable no code reads, and
the switch did nothing. The play logs of #4392 (RTX 5060) and #4564 carry
some sixty switches each that way ('VICTORY_TEXTURE_DROP_MIPS=2',
'VICTORY_AMBIENT=0.8', ...), all of them ignored.

unquoted() takes off one matching pair of ' or " around the whole entry
before it is split; quotes inside it (a path's) and an unmatched one are
left as they are. restart_args quotes the cleaned entry once, so a restart
from F1 does not carry the stray pair either. A test covers both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 00:23:36 +00:00
This pull request has changes conflicting with the target branch.
  • apps/victory/src/play.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-4631'
git switch 'github-bot/gh-4631'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-4631'
git switch 'github-bot/gh-4631'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-4631'
git switch 'main'
git merge --squash 'github-bot/gh-4631'
git switch 'main'
git merge --ff-only 'github-bot/gh-4631'
git switch 'main'
git merge 'github-bot/gh-4631'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

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