Fix --pull and --no-cache behavior#268
Merged
tonistiigi merged 4 commits intodocker:masterfrom Apr 30, 2020
Merged
Conversation
b4d6537 to
5fc6f16
Compare
Fixes --pull and --no-cache without argument Signed-off-by: Tibor Vass <tibor@docker.com>
thaJeztah
reviewed
Apr 30, 2020
| 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.
Curious; wouldn't something like this work?
flags.StringVar(&options.pull, "pull", nil, "Always attempt to pull a newer version of the image")(use nil as default)?
Collaborator
Author
There was a problem hiding this comment.
You'd have to do an strconv.ParseBool which flags.Bool does for us.
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
tiborvass
commented
Apr 30, 2020
| SSH []string `json:"ssh,omitempty" hcl:"ssh,optional"` | ||
| Platforms []string `json:"platforms,omitempty" hcl:"platforms,optional"` | ||
| Outputs []string `json:"output,omitempty" hcl:"output,optional"` | ||
| Pull bool `json:"pull,omitempty": hcl:"pull,optional"` |
Collaborator
Author
There was a problem hiding this comment.
@thaJeztah check out this stupidity!!!! 😆😠
tonistiigi
approved these changes
Apr 30, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes --pull and --no-cache without argument
Signed-off-by: Tibor Vass tibor@docker.com
Fixes #265