Skip to content

Commit

Permalink
checkpoint
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Ortel <[email protected]>
  • Loading branch information
jortel committed Mar 22, 2024
1 parent dbc41d3 commit 8caf004
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion addon/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,14 @@ func (r *EnvInjector) inject(in any) (out any) {
node[k] = r.inject(v)
}
out = node
case []any:
var injected []any
for _, n := range node {
injected = append(
injected,
r.inject(n))
}
out = injected
case string:
for {
match := EnvRegex.FindStringSubmatch(node)
Expand All @@ -307,10 +315,12 @@ func (r *EnvInjector) inject(in any) (out any) {
node = strings.Replace(
node,
match[0],
os.Getenv(match[1]),
os.Getenv(match[2]),
-1)
}
out = node
default:
out = node
}
return
}

0 comments on commit 8caf004

Please sign in to comment.