diff --git a/cmd/notary/delegations.go b/cmd/notary/delegations.go index 124d63e26e..8aec9fd5d4 100644 --- a/cmd/notary/delegations.go +++ b/cmd/notary/delegations.go @@ -198,6 +198,7 @@ func (d *delegationCommander) delegationRemove(cmd *cobra.Command, args []string // delegationAdd creates a new delegation by adding a public key from a certificate to a specific role in a GUN func (d *delegationCommander) delegationAdd(cmd *cobra.Command, args []string) error { + // We must have at least the gun and role name, and at least one key or path (or the --all-paths flag) to add if len(args) < 2 || len(args) < 3 && d.paths == nil && !d.allPaths { cmd.Usage() return fmt.Errorf("must specify the Global Unique Name and the role of the delegation along with the public key certificate paths and/or a list of paths to add")