Skip to content

Commit

Permalink
🐛 solves #10
Browse files Browse the repository at this point in the history
  • Loading branch information
Wytamma committed Oct 9, 2024
1 parent 4152286 commit 2e62fac
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/snk_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +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"):
user = os.environ.get("USER")
if platform.system() in ["Linux", "Darwin"] and not os.environ.get("XDG_CACHE_HOME") and user:
# this prevents OSError: [Errno 39] Directory not empty: 'envs'
# on older versions of snakemake
os.environ["XDG_CACHE_HOME"] = f"/tmp/.cache/{self.name}"
os.environ["XDG_CACHE_HOME"] = f"/tmp/snk-{user}-{self.name}"

# dynamically create the logo
self.logo = self._create_logo(
Expand Down

0 comments on commit 2e62fac

Please sign in to comment.