diff --git a/cmd/notary/keys.go b/cmd/notary/keys.go index 8e014c52f5..e8d2554c00 100644 --- a/cmd/notary/keys.go +++ b/cmd/notary/keys.go @@ -137,6 +137,8 @@ func keysList(cmd *cobra.Command, args []string) { } func keysGenerateRootKey(cmd *cobra.Command, args []string) { + // We require one or no arguments (since we have a default value), but if the + // user passes in more than one argument, we error out. if len(args) > 1 { cmd.Usage() fatalf("Please provide only one Algorithm as an argument to generate (rsa, ecdsa)") diff --git a/cmd/notary/main.go b/cmd/notary/main.go index 805ef928eb..7031a38068 100644 --- a/cmd/notary/main.go +++ b/cmd/notary/main.go @@ -82,13 +82,13 @@ func parseConfig() { } // At this point we either have the default value or the one set by the config. - // Either way, the command-line flag has precedence and overwrives the value + // Either way, the command-line flag has precedence and overwrites the value if trustDir != "" { mainViper.Set("trust_dir", trustDir) } // Expands all the possible ~/ that have been given, either through -d or config - // If there is no error, user it, if not, attempt to use whatever the user gave us + // If there is no error, use it, if not, attempt to use whatever the user gave us expandedTrustDir, err := homedir.Expand(mainViper.GetString("trust_dir")) if err == nil { mainViper.Set("trust_dir", expandedTrustDir)