Merge pull request #519 from vbatts/copy_help_output

cmd/skopeo: show full help on 'copy' with no args
This commit is contained in:
Daniel J Walsh 2018-06-29 11:17:03 -04:00 committed by GitHub
commit 6e23a32282
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,6 @@ package main
import ( import (
"context" "context"
"errors"
"fmt" "fmt"
"os" "os"
"strings" "strings"
@ -34,7 +33,7 @@ func contextsFromGlobalOptions(c *cli.Context) (*types.SystemContext, *types.Sys
func copyHandler(c *cli.Context) error { func copyHandler(c *cli.Context) error {
if len(c.Args()) != 2 { if len(c.Args()) != 2 {
return errors.New("Usage: copy source destination") return cli.ShowCommandHelp(c, "copy")
} }
policyContext, err := getPolicyContext(c) policyContext, err := getPolicyContext(c)