Commit bdc4367
fix(spur-cli): honor SPUR_* env-var twins in sbatch (#526)
sbatch resolved env defaults through clap's `env` attribute, which takes a
single variable name per flag, so the SPUR_* twins that srun and salloc
accept were silently ignored. Route sbatch through the shared env_defaults
resolver instead, applying env after the directive merge and only to flags
the CLI did not set, which preserves the CLI > env > #SBATCH precedence.
SPUR_JOB_NAME and SPUR_NODELIST stay unread: both are injected into every
running job, so honoring them would make an sbatch submitted from inside a
job inherit the enclosing job's name and node placement.
Co-authored-by: harssriv <harssriv@amd.com>
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent dd5f6e3 commit bdc4367
2 files changed
Lines changed: 289 additions & 112 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| 198 | + | |
198 | 199 | | |
199 | 200 | | |
200 | 201 | | |
| |||
0 commit comments