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

Open
tyr0nsur wants to merge 1 commit from upstream-pr/4631 into main
tyr0nsur commented 2026-12-01 00:22:47 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tyr0nsur on 2026-12-01T00:22:47Z.


Relates to #4392 and #4564.

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 #4392 (RTX 5060) and #4564 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: #4626 (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

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5576312144 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4631). Originally posted by [tyr0nsur](https://github.com/tyr0nsur) on 2026-12-01T00:22:47Z. --- Relates to #4392 and #4564. ## 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 #4392 (RTX 5060) and #4564 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: #4626 (`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)
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/4631:upstream-pr/4631'
git switch 'upstream-pr/4631'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/4631'
git switch 'upstream-pr/4631'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/4631'
git switch 'upstream-pr/4631'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/4631'
git switch 'main'
git merge --squash 'upstream-pr/4631'
git switch 'main'
git merge --ff-only 'upstream-pr/4631'
git switch 'main'
git merge 'upstream-pr/4631'
git push origin 'main'
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!4631
No description provided.