Repository navigation
Port upstream #363: an empty VIPORT_CONFIG means unset - #32
Merged
DesertGamer merged 1 commit intoNov 25, 2026
Merged
Conversation
(cherry picked from commit fd44561)
2 of 23 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
This ports Marvisak/VIctory#363 by Enzo Souza Duarte. It is cherry-picked with
-x, so the commit keeps their authorship.Config::loadtakesVIPORT_CONFIGas set even when it is empty. Then it requires a file named"". Onmain, withVIPORT_CONFIG=(empty) in the environment:So
viportfails at start-up instead of using./viport.toml. That happens, for example, afterset VIPORT_CONFIG=in a shell, or in a launcher that always passes the variable. All the other path variables already treat an empty value as unset (env_pathinConfig::resolve). Upstream madeVICTORY_CONFIGbehave the same way.VIPort has the upstream merge of #363 in its history, but the change is not in the tree. It was lost in a later merge.
The change adds
explicit_config_path, which drops an empty value, plus #363's unit test. Both conflicts came from the rename: the new lines useVIPORT_CONFIG, and the helper sits after VIPort's newerread_config_file.Checked
docs/asset-policy.mdbuild.rs, git hook,.cargoconfig, CI change or script (or an issue explains why)cargo test --workspacepasses (onlyviport-coreon Linux, see below)cargo clippy --workspace --all-targets --locked -- -D warningspasses (forviport-core)rustfmt; I did not reformat lines I did not changeWhat I ran
On Linux, Rust 1.98.1:
main, a throwaway test (not in this PR) that setsVIPORT_CONFIG=""and callsConfig::load()gives the error above.cargo test -p viport-core --locked: 15 passed, includingconfig::tests::empty_config_env_is_ignored.cargo clippy -p viport-core --all-targets --locked --target x86_64-pc-windows-msvc -- -D warnings: clean.Not run: the
viportbinary on Windows.Overlaps
None. No open PR touches
viport-core/src/config.rs.🤖 Generated with Claude Code