Repository navigation
Conversation
…1830) Ported from upstream VIctory commit 834d643 (pull request #1830, Ingenioer): victory config printed a POLICY VIOLATION line for each configured path inside the repository but still exited 0, so a script or a user checking the configuration could not tell the asset policy was violated (the repository says such paths must never hold game data). The policy check is now its own function, counts the violations and fails with "N configured path(s) violate the asset policy" when there is one; victory config then exits nonzero like every other failed command. Test: config_check_passes_paths_outside_the_repository and config_check_fails_a_path_inside_the_repository (a game_dir under CARGO_MANIFEST_DIR). cargo test -p victory: 3 passed, 0 failed; cargo clippy -p victory --all-targets -- -D warnings: clean.
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.
Problem
victory config prints POLICY VIOLATION: ... for each configured path the asset policy refuses (a game_dir, test title, cache_dir or data_dir inside the repository), but still returns Ok(()) and exits 0. A script or user checking the configuration cannot tell the asset policy was violated, although the repository requires those paths to stay outside it (nothing from the game may be committed).
Upstream VIctory fixed this in commit 834d643 (pull request #1830, by Ingenioer); this is that fix ported to the fork.
Change
Tests
(CI note: the check job on main is currently red on the asset-policy violation; #1322 fixes that, after which this can be rebased.)