Skip to content

Commit 6822d86

Browse files
committed
Set environment variables directly instead of through -v since -v does
not work multiple times and the quoting rules for it are not well defined.
1 parent cdd3e8c commit 6822d86

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/psij/executors/batch/pbs/pbs_classic.mustache

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ only results in empty files that are not cleaned up}}
5151
{{#job.spec.inherit_environment}}
5252
#PBS -V
5353
{{/job.spec.inherit_environment}}
54+
5455
{{#env}}
55-
#PBS -v {{name}}={{value}}
56+
export {{name}}={{value}}
5657
{{/env}}
5758

5859
PSIJ_NODEFILE="$PBS_NODEFILE"

src/psij/executors/batch/pbs/pbspro.mustache

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ only results in empty files that are not cleaned up}}
5454
{{#job.spec.inherit_environment}}
5555
#PBS -V
5656
{{/job.spec.inherit_environment}}
57+
5758
{{#env}}
58-
#PBS -v {{name}}={{value}}
59+
export {{name}}={{value}}
5960
{{/env}}
6061

6162
PSIJ_NODEFILE="$PBS_NODEFILE"

0 commit comments

Comments
 (0)