Commit 02ea8501 authored by Andy Cobaugh's avatar Andy Cobaugh

for-each-image: fix expansion of args

parent b427016c
Pipeline #119902 passed with stage
in 22 seconds
......@@ -52,11 +52,12 @@ func ciForEachImage(cmd *cobra.Command, args []string) error {
os.Setenv("DT_DOCKERFILE", d.Dockerfile)
os.Setenv("DT_DOCKERCONTEXT", dockerRootDir(d.Dockerfile))
var expandedArgs []string
for i := range args {
args[i] = os.ExpandEnv(args[i])
expandedArgs = append(expandedArgs, os.ExpandEnv(args[i]))
}
err := environment.Run(true, args[0], args[1:]...)
err := environment.Run(true, expandedArgs[0], expandedArgs[1:]...)
results = append(results, forEachImageResult{name: d.Name, e: err})
if err != nil {
color.New(color.FgHiRed).Printf("error: %s\n", err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment