diff --git a/cli/command/engine/activate.go b/cli/command/engine/activate.go index 34751609a6..9020d72e05 100644 --- a/cli/command/engine/activate.go +++ b/cli/command/engine/activate.go @@ -60,7 +60,7 @@ https://hub.docker.com/ then specify the file with the '--license' flag. flags.StringVar(&options.registryPrefix, "registry-prefix", clitypes.RegistryPrefix, "Override the default location where engine images are pulled") flags.StringVar(&options.image, "engine-image", "", "Specify engine image") flags.StringVar(&options.format, "format", "", "Pretty-print licenses using a Go template") - flags.BoolVar(&options.displayOnly, "display-only", false, "only display the available licenses and exit") + flags.BoolVar(&options.displayOnly, "display-only", false, "only display license information and exit") flags.BoolVar(&options.quiet, "quiet", false, "Only display available licenses by ID") flags.StringVar(&options.sockPath, "containerd", "", "override default location of containerd endpoint") @@ -90,6 +90,9 @@ func runActivate(cli command.Cli, options activateOptions) error { if license, err = getLicenses(ctx, authConfig, cli, options); err != nil { return err } + if options.displayOnly { + return nil + } } else { if license, err = licenseutils.LoadLocalIssuedLicense(ctx, options.licenseFile); err != nil { return err