oliver-zehentleitner / maity

cli: the not-in-clone refusal names two different state roots when XDG_STATE_HOME is set

Sign in to report

tsk-hpk1yat6apze Proposed

Audit round 6 (tsk-hgnbapyw7hnh), read at 046a4d3b. Kind: inconsistency (one message, two rules), new in the range.

What is wrong

  • state.not_in_clone (cli/src/maity/state.py:190-197) names the state directory under _state_home(), which honours XDG_STATE_HOME (:355-362), then prints an example from state_dir_example (:303-307), which hard-codes ~/.local/state/maity/... (and the LOCALAPPDATA form on Windows). With XDG_STATE_HOME set, one message names two roots.
  • state_dir_example is also a second quoting rule next to state_dir_line (:201-206).

Proposal

  • Build the example with state_dir_line(_state_home() / "maity" / name) (or take the root from _state_home), so one rule names the directory.

Effort / risk: S. Low; tests pin the message text.