Skip to content

Commit 8860d3c

Browse files
fix envvar declaration
1 parent be4910a commit 8860d3c

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

  • snakemake_interface_executor_plugins/executors

snakemake_interface_executor_plugins/executors/real.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ def common_settings(self):
122122

123123
def get_envvar_declarations(self):
124124
if self.common_settings.pass_envvar_declarations_to_cmd:
125-
return " ".join(f"{var}={repr(value)}" for var, value in self.envvars())
125+
defs = " ".join(f"{var}={repr(value)}" for var, value in self.envvars())
126+
return f"export {defs} &&"
126127
else:
127128
return ""
128129

@@ -153,7 +154,6 @@ def format_job_exec(self, job: JobExecutorInterface) -> str:
153154
[
154155
prefix,
155156
self.get_envvar_declarations(),
156-
"(",
157157
precommand,
158158
self.get_python_executable(),
159159
"-m snakemake",
@@ -167,7 +167,6 @@ def format_job_exec(self, job: JobExecutorInterface) -> str:
167167
self.workflow.group_settings.local_groupid,
168168
skip=self.job_specific_local_groupid,
169169
),
170-
")",
171170
suffix,
172171
]
173172
)

0 commit comments

Comments
 (0)