Config: ignore an empty VICTORY_CONFIG #634

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

@⁠davutsimsekk on GitHub · 2026-11-25 03:37 UTC · original
davutsimsekk:fix/config-empty-env → main · +19 −1 · 1 files · 1 commits · open

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.
**@⁠davutsimsekk** on GitHub · 2026-11-25 03:37 UTC · [original](https://github.com/fxceless/victory-fork/pull/634) `davutsimsekk:fix/config-empty-env` → `main` · +19 −1 · 1 files · 1 commits · open 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:47:48 +00:00
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/634/head:github-bot/gh-634'
git switch 'github-bot/gh-634'

Merge

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