Skip to content

Commit

Permalink
Fixing issue with environment var splitting (issue #494)
Browse files Browse the repository at this point in the history
  • Loading branch information
gbluma authored and jkuri committed Jan 23, 2021
1 parent 4a32f1a commit dfef906
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions server/scheduler/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,13 @@ func (s *scheduler) startJob(job *core.Job, worker *core.Worker) {
env := strings.Split(job.Env, " ")
for _, e := range env {
splitted := strings.Split(e, "=")
envs = append(envs, &pb.EnvVariable{
Key: splitted[0],
Value: splitted[1],
Secret: false,
})
if (len(splitted) > 1) {
envs = append(envs, &pb.EnvVariable{
Key: splitted[0],
Value: splitted[1],
Secret: false,
})
}
}

for _, e := range job.Build.Repository.EnvVariables {
Expand Down

0 comments on commit dfef906

Please sign in to comment.