mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-18 14:28:01 +00:00
podman build --build-arg should fall back to environment
Fixes: https://github.com/containers/podman/issues/9571 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
2c500a8145
commit
01ffe2c30a
1 changed files with 6 additions and 1 deletions
|
|
@ -318,7 +318,12 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil
|
|||
if len(av) > 1 {
|
||||
args[av[0]] = av[1]
|
||||
} else {
|
||||
delete(args, av[0])
|
||||
// check if the env is set in the local environment and use that value if it is
|
||||
if val, present := os.LookupEnv(av[0]); present {
|
||||
args[av[0]] = val
|
||||
} else {
|
||||
delete(args, av[0])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue