victory config: a policy violation fails the command (#301) #340
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD!340
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-340"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@TinkerBell-90 on GitHub · 2026-11-26 20:59 UTC · original
TinkerBell-90:config-policy-fails→a-publier· +31 −7 · 1 files · 1 commits · merged 2026-11-26 22:30 UTCFixes #301.
victory configprintedPOLICY VIOLATION: ...on stdout and still returnedOk, so it exited 0 on the configurationensure_outside_repoexists to refuse. The check now goes through a smallcheck_policythat writes each violation to stderr and returns an error when there is one, so the command exits 1, asvictory translateand the other commands that use the path already stop. The resolved values still print first, on stdout.Tested on Linux, the app built for
x86_64-pc-windows-gnuand run under Wine 10, on top ofa-publieratcd8dfc0. No game files:game_dirwas not set, onlyVICTORY_CACHE_DIRandVICTORY_DATA_DIR. Nothing was run in game.VICTORY_CACHE_DIRinside the source tree: before, the violation on stdout and exit code 0; after, the violation on stderr,Error: 1 policy violation(s)and exit code 1.config_check_fails_on_a_path_inside_the_repo(one path outside, the same inside path twice: two violations). 23/23 tests of the app pass under Wine. With the old behaviour put back (no error at the end), the test fails onunwrap_err.cargo clippy --no-deps -p victory --all-targets --target x86_64-pc-windows-gnu -- -D warningsis clean, and rustfmt has nothing to say about the added lines.AI-assisted.