Config: ignore an empty VICTORY_CONFIG #634

Open
davutsimsekk wants to merge 1 commit from upstream-pr/634 into main
davutsimsekk commented 2026-11-25 03:37:06 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by davutsimsekk on 2026-11-25T03:37:06Z.


An empty VICTORY_CONFIG (VICTORY_CONFIG=) was kept as Some(""), so every command failed with VICTORY_CONFIG points at , which does not exist. The other path variables already ignore empty values.

This treats an empty config path as unset and falls back to ./victory.toml or the defaults. A non-empty path, including a missing one, behaves as before.

Test

empty_config_env_is_ignored checks Some("") becomes None and a real path is kept, without touching the process environment.

  • cargo test -p victory-core --lib: 12 passed, 0 failed
  • cargo clippy -p victory-core --all-targets --locked -- -D warnings: clean
  • rustfmt --edition 2024 --check crates/victory-core/src/config.rs: clean
  • No game data or GPU was used.
<!-- greyfinch-sync:fxceless/victory-fork:issue:6596622272 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/634). Originally posted by [davutsimsekk](https://github.com/davutsimsekk) on 2026-11-25T03:37:06Z. --- An empty `VICTORY_CONFIG` (`VICTORY_CONFIG=`) was kept as `Some("")`, so every command failed with `VICTORY_CONFIG points at , which does not exist`. The other path variables already ignore empty values. This treats an empty config path as unset and falls back to `./victory.toml` or the defaults. A non-empty path, including a missing one, behaves as before. ## Test `empty_config_env_is_ignored` checks `Some("")` becomes `None` and a real path is kept, without touching the process environment. - `cargo test -p victory-core --lib`: 12 passed, 0 failed - `cargo clippy -p victory-core --all-targets --locked -- -D warnings`: clean - `rustfmt --edition 2024 --check crates/victory-core/src/config.rs`: clean - No game data or GPU was used.
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/634:upstream-pr/634'
git switch 'upstream-pr/634'

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/634'
git switch 'upstream-pr/634'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/634'
git switch 'upstream-pr/634'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/634'
git switch 'main'
git merge --squash 'upstream-pr/634'
git switch 'main'
git merge --ff-only 'upstream-pr/634'
git switch 'main'
git merge 'upstream-pr/634'
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
fxceless/victory-fork!634
No description provided.