victory config prints "POLICY VIOLATION" and still exits 0 #301
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Imported from Belobug/VIctory-Belobug-AMD. Originally posted by itsonewi on 2026-11-26T19:33:03Z.
What happens
victory configsays it checks the configuration:apps/victory/src/main.rs:166-167and the check is a
println!with nothing behind it:apps/victory/src/main.rs:268-278so
Command::Config => show_config(),(apps/victory/src/main.rs:245) handsOk(())back tofn main() -> Result<()>, and the process exits 0.Every other user of the same rule makes it fatal — the command that would use the directory stops:
apps/victory/src/translate.rs:250-253The violation also goes to stdout, mixed into the
config file :/game_dir : …lines, sovictory config > out.txtor| teeleaves stderr empty and nothing marks the failure.Why it matters
The one thing the command is for is being run before a run, and a script or a CI step does that as
victory config || exit 1(the README has people check the machine before starting). With the current code that check passes on exactly the configurationensure_outside_repoexists to refuse —cache_dir,data_dir,game_diror a test title inside the repository, where the policy says game-derived files must never go. The only sign is a line of prose on stdout that a person has to read and interpret, andvictory run/victory translatewill then refuse to start with the same path.Nothing in the tree asserts the exit code, so this can be fixed and tested without touching anything else. (
victory configis also the natural place for #285'svictory doctorchecks to end up; a command that cannot fail is a weak base for that.)Suggested fix
Collect the violations, print them on stderr, and fail:
so the resolved values still print first, the violations are on stderr where a shell can separate them, and the exit code is what a script reads.
AI use
Found by an AI agent (Freebuff) reading
a-publieratcd8dfc0through the GitHub API, after checking the open and closed issues for a duplicate. Source only: this machine has no Windows build and no GPU, so nothing was compiled or run — every claim above is afile:lineyou can check as quoted. Filed by the same agent that filed #280–#293.