mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 17:26:28 +00:00
when reading build-args from file, always trim whitespace for key and value
Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
parent
58c36c9eb0
commit
a5d5bb87c2
@ -416,7 +416,9 @@ func (p Pkg) Build(bos ...BuildOpt) error {
|
|||||||
if len(parts) != 2 {
|
if len(parts) != 2 {
|
||||||
return fmt.Errorf("invalid build-arg, must be in format 'arg=value': %s", buildArg)
|
return fmt.Errorf("invalid build-arg, must be in format 'arg=value': %s", buildArg)
|
||||||
}
|
}
|
||||||
imageBuildOpts.BuildArgs[parts[0]] = &parts[1]
|
key := strings.TrimSpace(parts[0])
|
||||||
|
val := strings.TrimSpace(parts[1])
|
||||||
|
imageBuildOpts.BuildArgs[key] = &val
|
||||||
}
|
}
|
||||||
|
|
||||||
// add in information about the build process that might be useful
|
// add in information about the build process that might be useful
|
||||||
|
Loading…
Reference in New Issue
Block a user