Allow newline characters in build/deploy --buildArg values

Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
This commit is contained in:
Paulo Castro 2019-05-29 23:37:13 +01:00
parent d21b84956c
commit e145540132

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