mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
No error shadow pullImageIfNotExist
Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
parent
1529343a3f
commit
b7009a4b3a
1 changed files with 3 additions and 3 deletions
|
@ -609,16 +609,16 @@ func imageExists(image string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
func pullImageIfNotExist(image string) (err error) {
|
||||
func pullImageIfNotExist(image string) error {
|
||||
if err := imageExists(image); err != nil {
|
||||
pullCmd := exec.Command(dockerBinary, "pull", image)
|
||||
_, exitCode, err := runCommandWithOutput(pullCmd)
|
||||
|
||||
if err != nil || exitCode != 0 {
|
||||
err = fmt.Errorf("image %q wasn't found locally and it couldn't be pulled: %s", image, err)
|
||||
return fmt.Errorf("image %q wasn't found locally and it couldn't be pulled: %s", image, err)
|
||||
}
|
||||
}
|
||||
return
|
||||
return nil
|
||||
}
|
||||
|
||||
func dockerCmdWithError(args ...string) (string, int, error) {
|
||||
|
|
Loading…
Add table
Reference in a new issue