Skip to content

Commit 15e6902

Browse files
authored
BUG: fix conda_prefix check when not using conda (#380)
Closed #377.
1 parent 3740acc commit 15e6902

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

q2cli/util.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ class OutOfDisk(Exception):
1313

1414
def get_app_dir():
1515
import os
16-
conda_prefix = os.environ.get('CONDA_PREFIX')
16+
conda_prefix = os.environ.get('CONDA_PREFIX', '')
1717
environment_cache = os.path.join(conda_prefix, 'var', 'q2cli')
18-
if conda_prefix is not None and (os.access(conda_prefix, os.W_OK | os.X_OK)
19-
or os.path.exists(environment_cache)):
18+
if conda_prefix != '' and (os.access(conda_prefix, os.W_OK | os.X_OK)
19+
or os.path.exists(environment_cache)):
2020
return environment_cache
2121
else:
2222
import click

0 commit comments

Comments
 (0)