CLI: victory config shows the data folder and checks it is outside the repo #277

Closed
github-bot wants to merge 1 commit from gh-pr/277/head into gh-pr/277/base
Owner

@⁠SkippySteve on GitHub · 2026-11-24 01:59 UTC · original
SkippySteve/victory-pr-own-next12 → main · +2 −1 · 1 files · 1 commits · closed without merging

Config resolves a data folder (saves, settings, crashes.log; VICTORY_DATA_DIR or [paths].data_dir) the same way as the cache folder. The README points users to it, but victory config neither printed it nor ran the outside-the-repository check on it. A data folder pointing into the source tree went unreported, even though it is the folder that receives title-written files.

show_config now prints a data_dir line and includes the data folder in the ensure_outside_repo loop, alongside the game, test-title and cache paths. No other behaviour changes.

Testing

Linux, with #235 applied so apps/victory builds there:

$ VICTORY_CACHE_DIR=/tmp/x/c VICTORY_DATA_DIR=<repo>/saves victory config
config file : (none)
game_dir    : (not set)
cache_dir   : /tmp/x/c
data_dir    : <repo>/saves
POLICY VIOLATION: refusing to use <repo>/saves for game-derived data: it is inside the VIctory source tree ...

Before this change, the same command printed no data_dir line and no violation. With both folders outside the repo, it prints both lines and no violation.

  • cargo fmt --check -p victory: clean
  • cargo clippy -p victory --all-targets: no new warnings
  • cargo test -p victory: passes
**@⁠SkippySteve** on GitHub · 2026-11-24 01:59 UTC · [original](https://github.com/Marvisak/VIctory/pull/277) `SkippySteve/victory-pr-own-next12` → `main` · +2 −1 · 1 files · 1 commits · closed without merging `Config` resolves a data folder (saves, settings, `crashes.log`; `VICTORY_DATA_DIR` or `[paths].data_dir`) the same way as the cache folder. The README points users to it, but `victory config` neither printed it nor ran the outside-the-repository check on it. A data folder pointing into the source tree went unreported, even though it is the folder that receives title-written files. `show_config` now prints a `data_dir` line and includes the data folder in the `ensure_outside_repo` loop, alongside the game, test-title and cache paths. No other behaviour changes. ## Testing Linux, with #235 applied so `apps/victory` builds there: ``` $ VICTORY_CACHE_DIR=/tmp/x/c VICTORY_DATA_DIR=<repo>/saves victory config config file : (none) game_dir : (not set) cache_dir : /tmp/x/c data_dir : <repo>/saves POLICY VIOLATION: refusing to use <repo>/saves for game-derived data: it is inside the VIctory source tree ... ``` Before this change, the same command printed no `data_dir` line and no violation. With both folders outside the repo, it prints both lines and no violation. - `cargo fmt --check -p victory`: clean - `cargo clippy -p victory --all-targets`: no new warnings - `cargo test -p victory`: passes
The data folder (saves, settings, crashes.log) is resolved by Config
like the cache folder, but `victory config` neither printed it nor ran
the outside-the-repository check on it, so a VICTORY_DATA_DIR or
[paths].data_dir pointing into the source tree went unreported.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:57:40 +00:00
github-bot closed this pull request 2026-11-26 03:57:40 +00:00
Author
Owner

@⁠SkippySteve on GitHub · 2026-11-24 02:32 UTC · original

Superseded by #241, which now carries this commit (victory config shows and checks the data folder).

**@⁠SkippySteve** on GitHub · 2026-11-24 02:32 UTC · [original](https://github.com/Marvisak/VIctory/pull/277#issuecomment-7120244193) Superseded by #241, which now carries this commit (`victory config` shows and checks the data folder).

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!277
No description provided.