diff --git a/src/isn/Program.cs b/src/isn/Program.cs index 8a543a6..70b0d8a 100644 --- a/src/isn/Program.cs +++ b/src/isn/Program.cs @@ -46,7 +46,6 @@ namespace isn static readonly OptionSet pushoptions = new OptionSet { { "k|api-key=", "use api key", val => apiKey = apiKey ?? val }, - { "p|store-api-key", "store used api key", val => storApiKey = val != null }, { "s|source=", "use source", val => CurrentSource = CurrentSource ?? val }, { "h|help", "show this message and exit", h => shouldShowPushHelp = h != null }, }; @@ -179,7 +178,7 @@ namespace isn } }; - var setapikey = new Command("set-api-key") + var setapikey = new Command("store-api-key", "Store this API key") { Run = sargs => StoreApiKey(sargs) }; diff --git a/src/isn/commands/set-api-key.cs b/src/isn/commands/set-api-key.cs index 7b2f018..7aecbf2 100644 --- a/src/isn/commands/set-api-key.cs +++ b/src/isn/commands/set-api-key.cs @@ -9,14 +9,18 @@ namespace isn partial class Program { - private static void StoreApiKey(IEnumerable storeArgs) { var args = storeoptions.Parse(storeArgs); + if (args.Count != 1) + { + Console.Error.WriteLine("StoreApiKey command takse one and only one argument, the key."); + shouldShowPushHelp=true; + } if (shouldShowPushHelp) { // output the options - Console.Error.WriteLine("Push Options:"); + Console.Error.WriteLine("StoreApiKey Options:"); storeoptions.WriteOptionDescriptions(Console.Out); } else