Skip to content

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

Closed
SkippySteve wants to merge 1 commit into
Marvisak:mainfrom
SkippySteve:SkippySteve/victory-pr-own-next12
Closed

SkippySteve wants to merge 1 commit into
Marvisak:mainfrom
SkippySteve:SkippySteve/victory-pr-own-next12

Conversation

@SkippySteve

Copy link
Copy Markdown

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 repo

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.
@SkippySteve

Copy link
Copy Markdown
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant