Skip to content

Commit

Permalink
Fix pusher flags for --config and --tarball (#1998)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonjohnsonjr authored Jan 13, 2022
1 parent 40d4036 commit 74be309
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions container/go/cmd/pusher/pusher.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ import (

var (
dst = flag.String("dst", "", "The destination location including repo and digest/tag of the docker image to push. Supports fully-qualified tag or digest references.")
imgTarball = flag.String("tarball", "", "Path to the image tarball as generated by docker save.")
imgConfig = flag.String("config", "", "Path to the image config.json. Required when --format is Docker.")
imgTarball = flag.String("tarball", "", "Path to the image tarball as generated by docker save. Required if --config was not specified.")
imgConfig = flag.String("config", "", "Path to the image config.json. Required if --tarball was not specified.")
baseManifest = flag.String("manifest", "", "Path to the manifest of the base image. This should be the very first image in the chain of images and is only really required for windows images with a base image that has foreign layers.")
format = flag.String("format", "", "The format of the uploaded image (Docker or OCI).")
clientConfigDir = flag.String("client-config-dir", "", "The path to the directory where the client configuration files are located. Overiddes the value from DOCKER_CONFIG.")
Expand Down Expand Up @@ -81,8 +81,8 @@ func main() {
if *format == "" {
log.Fatalln("Required option -format was not specified.")
}
if *imgConfig == "" {
log.Fatalln("Option --config is required.")
if *imgTarball == "" && *imgConfig == "" {
log.Fatalln("Neither --tarball nor --config was specified.")
}

// If the user provided a client config directory, ensure it's a valid
Expand Down

0 comments on commit 74be309

Please sign in to comment.