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

Closed
SkippySteve wants to merge 1 commit from upstream-pr/277 into main
SkippySteve commented 2026-11-24 01:59:50 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by SkippySteve on 2026-11-24T01:59:50Z.


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
<!-- greyfinch-sync:Marvisak/VIctory:issue:6572883886 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/277). Originally posted by [SkippySteve](https://github.com/SkippySteve) on 2026-11-24T01:59:50Z. --- `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
upstream-sync closed this pull request 2026-11-24 06:52:11 +00:00
SkippySteve commented 2026-11-24 06:55:12 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by SkippySteve on 2026-11-24T02:32:27Z.


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

<!-- greyfinch-sync:Marvisak/VIctory:comment:7120244193 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/277#issuecomment-7120244193). Originally posted by [SkippySteve](https://github.com/SkippySteve) on 2026-11-24T02:32:27Z. --- Superseded by #241, which now carries this commit (`victory config` shows and checks the data folder).

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!277
No description provided.