fix(qmd): honor XDG_CACHE_HOME for the setup-owned model files

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Julian lechnerandClaude Opus 5.5 committed 2026-10-08 12:41:42 +02:00
1 parent 7ebd61f35b
commit 233152ff54
3 files changed
+8 -2

No files matched your search

+6
View File
@@ -351,6 +351,12 @@ class SetupTest(unittest.TestCase):
self.assertFalse(self.scripts_dir().exists())
self.assertFalse((self.home / '.my-ai-configuration/qmd.json').exists())
def test_models_dir_honors_xdg_cache_home(self):
os.environ['XDG_CACHE_HOME'] = str(self.home / 'xdg')
self.assertEqual(self.setup(FakeRunner()).models, self.home / 'xdg' / 'qmd' / 'models')
os.environ['XDG_CACHE_HOME'] = ''
self.assertEqual(self.setup(FakeRunner()).models, self.home / '.cache' / 'qmd' / 'models')
if __name__ == '__main__':
unittest.main()