Skip to content

Commit

Permalink
Strip quotes from stepEnv (#30)
Browse files Browse the repository at this point in the history
Fixes #29
  • Loading branch information
keith authored Jun 10, 2021
1 parent 5826cbd commit a51da48
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/job.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,11 @@ function(jobName, agentEnv={}, stepEnvFile='', patchFunc=identity) patchFunc({
local stepEnv =
[
{
local trim(v) = if std.startsWith(v, '"') && std.endsWith(v, '"')
then std.substr(v, 1, std.length(v) - 2) else v,
local kv = std.splitLimit(l, '=', 1),
name: kv[0],
value: kv[1],
value: trim(kv[1]),
}
for l in std.split(stepEnvFile, '\n')
if l != '' && !std.startsWith(l, 'BUILDKITE')
Expand Down

0 comments on commit a51da48

Please sign in to comment.