Skip to content

Commit a51da48

Browse files
authored
Strip quotes from stepEnv (#30)
Fixes #29
1 parent 5826cbd commit a51da48

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/job.jsonnet

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,11 @@ function(jobName, agentEnv={}, stepEnvFile='', patchFunc=identity) patchFunc({
8383
local stepEnv =
8484
[
8585
{
86+
local trim(v) = if std.startsWith(v, '"') && std.endsWith(v, '"')
87+
then std.substr(v, 1, std.length(v) - 2) else v,
8688
local kv = std.splitLimit(l, '=', 1),
8789
name: kv[0],
88-
value: kv[1],
90+
value: trim(kv[1]),
8991
}
9092
for l in std.split(stepEnvFile, '\n')
9193
if l != '' && !std.startsWith(l, 'BUILDKITE')

0 commit comments

Comments
 (0)