Skip to content

Commit 3fddc50

Browse files
committed
Fix nox when HOME not set
1 parent 99d4344 commit 3fddc50

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

noxfile.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@
2929
IRIS_SOURCE = os.environ.get("IRIS_SOURCE", ['source', 'conda-forge'])
3030

3131
#: Default cartopy cache directory.
32-
CARTOPY_CACHE_DIR = os.environ.get("HOME") / Path(".local/share/cartopy")
32+
if os.getenv("HOME"):
33+
CARTOPY_CACHE_DIR = Path(os.getenv("HOME")) / ".local/share/cartopy"
34+
else:
35+
CARTOPY_CACHE_DIR = None
3336

3437

3538
def venv_cached(session, requirements_file=None):

0 commit comments

Comments
 (0)