Merge pull request #45917 from josegonzalez/patch-2
Sort unconsumed build arguments before usage
This commit is contained in:
commit
43007108e6
1 changed files with 2 additions and 0 deletions
|
@ -3,6 +3,7 @@ package dockerfile // import "github.com/docker/docker/builder/dockerfile"
|
|||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"sort"
|
||||
|
||||
"github.com/docker/docker/runconfig/opts"
|
||||
)
|
||||
|
@ -80,6 +81,7 @@ func (b *BuildArgs) WarnOnUnusedBuildArgs(out io.Writer) {
|
|||
}
|
||||
}
|
||||
if len(leftoverArgs) > 0 {
|
||||
sort.Strings(leftoverArgs)
|
||||
fmt.Fprintf(out, "[Warning] One or more build-args %v were not consumed\n", leftoverArgs)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue