Skip to content

Commit

Permalink
🐛 use /tmp for XDG_CACHE_HOME
Browse files Browse the repository at this point in the history
  • Loading branch information
Wytamma committed Oct 8, 2024
1 parent 03aa36c commit 5c69a8f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/snk_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ def __init__(self, workflow_dir_path: Path = None, *, pipeline_dir_path: Path =
):
os.environ["CONDA_SUBDIR"] = "osx-64"

if platform.system() in ["Linux", "Darwin"] and not os.environ.get("XDG_CACHE_HOME"):
# this prevents OSError: [Errno 39] Directory not empty: 'envs'
# on older versions of snakemake
os.environ["XDG_CACHE_HOME"] = f"/tmp/.cache/{self.name}"

# dynamically create the logo
self.logo = self._create_logo(
tagline=self.snk_config.tagline, font=self.snk_config.font
Expand Down

0 comments on commit 5c69a8f

Please sign in to comment.