We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 97e80cc commit 6c452c7Copy full SHA for 6c452c7
q2cli/util.py
@@ -14,8 +14,10 @@ class OutOfDisk(Exception):
14
def get_app_dir():
15
import os
16
conda_prefix = os.environ.get('CONDA_PREFIX')
17
- if conda_prefix is not None and os.access(conda_prefix, os.W_OK | os.X_OK):
18
- return os.path.join(conda_prefix, 'var', 'q2cli')
+ environment_cache = os.path.join(conda_prefix, 'var', 'q2cli')
+ if conda_prefix is not None and (os.access(conda_prefix, os.W_OK | os.X_OK)
19
+ or os.path.exists(environment_cache)):
20
+ return environment_cache
21
else:
22
import click
23
return click.get_app_dir('q2cli', roaming=False)
0 commit comments