Skip to content

Commit 98c6ea6

Browse files
authored
test: override XDG_DATA_HOME so menuinst writes shortcuts (#6004)
1 parent cf00dcf commit 98c6ea6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/integration_python/pixi_global/test_shortcuts.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ def setup_data(tmp_path: Path) -> SetupData:
2525
env = {
2626
"PIXI_HOME": str(pixi_home),
2727
"HOME": str(data_home), # Used for macOS and Linux
28+
# menuinst follows XDG on Linux and falls back to $HOME/.local/share only when
29+
# XDG_DATA_HOME is unset, so override it explicitly to keep the shortcut inside
30+
# the per-test data_home.
31+
"XDG_DATA_HOME": str(data_home / ".local" / "share"),
2832
"MENUINST_FAKE_DIRECTORIES": str(data_home), # Used for Windows
2933
}
3034
return SetupData(pixi_home=pixi_home, data_home=data_home, env=env)

0 commit comments

Comments
 (0)