-
Notifications
You must be signed in to change notification settings - Fork 637
Fix --pull and --no-cache behavior #268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,6 @@ import ( | |
| "strings" | ||
|
|
||
| "github.com/docker/buildx/build" | ||
| "github.com/docker/buildx/util/flagutil" | ||
| "github.com/docker/buildx/util/platformutil" | ||
| "github.com/docker/buildx/util/progress" | ||
| "github.com/docker/cli/cli" | ||
|
|
@@ -305,9 +304,9 @@ func buildCmd(dockerCli command.Cli, rootOpts *rootOptions) *cobra.Command { | |
| } | ||
|
|
||
| func commonBuildFlags(options *commonOptions, flags *pflag.FlagSet) { | ||
| flags.Var(flagutil.Tristate(options.noCache), "no-cache", "Do not use cache when building the image") | ||
| options.noCache = flags.Bool("no-cache", false, "Do not use cache when building the image") | ||
| flags.StringVar(&options.progress, "progress", "auto", "Set type of progress output (auto, plain, tty). Use plain to show container output") | ||
| flags.Var(flagutil.Tristate(options.pull), "pull", "Always attempt to pull a newer version of the image") | ||
| options.pull = flags.Bool("pull", false, "Always attempt to pull a newer version of the image") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Curious; wouldn't something like this work? flags.StringVar(&options.pull, "pull", nil, "Always attempt to pull a newer version of the image")(use
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You'd have to do an strconv.ParseBool which flags.Bool does for us. |
||
| } | ||
|
|
||
| func listToMap(values []string, defaultEnv bool) map[string]string { | ||
|
|
||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thaJeztah check out this stupidity!!!! 😆😠