Monorepo for Tangled tangled.org

spindle/engines/nixery: fix panic when parsing environment variables #879

merged opened by evan.jarrett.net targeting master from evan.jarrett.net/core: nixery-fix
Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:pddp4xt5lgnv2qsegbzzs4xg/sh.tangled.repo.pull/3m7rfdxqs6c22
+5 -3
Diff #0
+5 -3
spindle/engines/nixery/engine.go
··· 294 workflowEnvs.AddEnv(s.Key, s.Value) 295 } 296 297 - step := w.Steps[idx].(Step) 298 299 select { 300 case <-ctx.Done(): ··· 303 } 304 305 envs := append(EnvVars(nil), workflowEnvs...) 306 - for k, v := range step.environment { 307 - envs.AddEnv(k, v) 308 } 309 envs.AddEnv("HOME", homeDir) 310
··· 294 workflowEnvs.AddEnv(s.Key, s.Value) 295 } 296 297 + step := w.Steps[idx] 298 299 select { 300 case <-ctx.Done(): ··· 303 } 304 305 envs := append(EnvVars(nil), workflowEnvs...) 306 + if nixStep, ok := step.(Step); ok { 307 + for k, v := range nixStep.environment { 308 + envs.AddEnv(k, v) 309 + } 310 } 311 envs.AddEnv("HOME", homeDir) 312

History

1 round 1 comment
sign up or login to add to the discussion
evan.jarrett.net submitted #0
1 commit
expand
spindle/engines/nixery: fix panic when parsing environment variables
expand 1 comment

note: I'm still in progress of setting up my local spindle so I can't really check this working (my spindle still fails at other places). But from my broken spindle log, the error related to the issue seems to be resolved with this change.

So I'm optimistically merging this. Thank you for the contribution!

pull request successfully merged