Skip to content

Commit

Permalink
fix: do not pass SNAKEMAKE_PROFILE into cluster-submit (snakemake#1398)
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed Feb 17, 2022
1 parent 0593de1 commit 7255528
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions snakemake/executors/__init__.py
Expand Up @@ -1070,12 +1070,17 @@ def run(self, job, callback=None, submit_callback=None, error_callback=None):
raise WorkflowError(str(e), rule=job.rule if not job.is_group() else None)

try:
# Remove SNAKEMAKE_PROFILE from environment as the snakemake call inside
# of the cluster job must run locally (or complains about missing -j).
env = dict(os.environ.items())
env.pop("SNAKEMAKE_PROFILE", None)
ext_jobid = (
subprocess.check_output(
'{submitcmd} "{jobscript}"'.format(
submitcmd=submitcmd, jobscript=jobscript
),
shell=True,
env=env,
)
.decode()
.split("\n")
Expand Down

0 comments on commit 7255528

Please sign in to comment.