pub fn mise_data_dir(
environment: &[(OsString, OsString)],
home: Option<&Path>,
) -> Option<PathBuf>Expand description
What:
Resolve mise’s data directory the way mise does:
MISE_DATA_DIR,
then
XDG_DATA_HOME/mise,
then HOME/.local/share/mise;
an empty value counts as unset.
Option<&Path> is “a borrowed home directory or nothing”;
Option<PathBuf> is “an owned path or nothing”.
Why:
mise keeps each tool plugin as a Git clone under plugins/ there and updates it with a
forced checkout, which the main-worktree rule would reject.
The home directory is injected so
tests never read the real one.
In TS you’d write (pseudocode):
function miseDataDir(environment: [string, string][], home?: string): string | undefined;