Merge pull request #1269 from balena-io/newline-build-arg

Allow newline characters in build/deploy --buildArg values
This commit is contained in:
Paulo Castro 2019-05-30 16:03:40 +01:00 committed by GitHub
commit f2af7b2588
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -130,7 +130,8 @@ parseBuildArgs = (args) ->
args = [ args ]
buildArgs = {}
args.forEach (arg) ->
pair = /^([^\s]+?)=(.*)$/.exec(arg)
# note: [^] matches any character, including line breaks
pair = /^([^\s]+?)=([^]*)$/.exec(arg)
if pair?
buildArgs[pair[1]] = pair[2] ? ''
else