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:
1 parent
7ebd61f35b
commit
233152ff54
3 files changed
+8
-2
No files matched your search
@@ -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()
|
||||
Reference in new issue
Block a user