From ab39f3f6bc735e1b4cab302835e57b563d6b25ef Mon Sep 17 00:00:00 2001 From: Geoffrey Goh Date: Wed, 4 Nov 2015 14:27:22 -0800 Subject: [PATCH] removed --- cli/README.md | 2 +- cli/script/command-executor.ts | 2 +- cli/script/command-parser.ts | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cli/README.md b/cli/README.md index 94684fc..8c849e1 100644 --- a/cli/README.md +++ b/cli/README.md @@ -116,7 +116,7 @@ Once your app has been configured to query for updates against the CodePush serv code-push release [--deploymentName ] [--description ] -[--mandatory ] +[--mandatory] ``` #### Package parameter diff --git a/cli/script/command-executor.ts b/cli/script/command-executor.ts index c56a828..981c36b 100644 --- a/cli/script/command-executor.ts +++ b/cli/script/command-executor.ts @@ -115,7 +115,7 @@ function removeLocalAccessKey(): Promise { } function accessKeyRemove(command: cli.IAccessKeyRemoveCommand): Promise { - if (command.accessKeyName === (connectionInfo).accessKeyName || command.accessKeyName === (connectionInfo).accessKey) { + if (connectionInfo && (command.accessKeyName === (connectionInfo).accessKeyName || command.accessKeyName === (connectionInfo).accessKey)) { return removeLocalAccessKey(); } else { return getAccessKeyId(command.accessKeyName) diff --git a/cli/script/command-parser.ts b/cli/script/command-parser.ts index 4a402e9..139bf8c 100644 --- a/cli/script/command-parser.ts +++ b/cli/script/command-parser.ts @@ -86,7 +86,7 @@ function appRemove(commandName: string, yargs: yargs.Argv): void { function deploymentList(commandName: string, yargs: yargs.Argv): void { isValidCommand = true; - yargs.usage(USAGE_PREFIX + " deployment " + commandName + " [--format ] [--verbose ]") + yargs.usage(USAGE_PREFIX + " deployment " + commandName + " [--format ] [--verbose]") .demand(/*count*/ 3, /*max*/ 3) // Require exactly three non-option arguments. .example("deployment " + commandName + " MyApp", "Lists deployments for app \"MyApp\" in tabular format") .example("deployment " + commandName + " MyApp --format json", "Lists deployments for app \"MyApp\" in JSON format") @@ -148,7 +148,7 @@ var argv = yargs.usage(USAGE_PREFIX + " ") addCommonConfiguration(yargs); }) .command("release", "Release a new version of your app to a specific deployment", (yargs: yargs.Argv) => { - yargs.usage(USAGE_PREFIX + " release [--deploymentName ] [--description ] [--mandatory ]") + yargs.usage(USAGE_PREFIX + " release [--deploymentName ] [--description ] [--mandatory]") .demand(/*count*/ 4, /*max*/ 4) // Require exactly four non-option arguments. .example("release MyApp app.js 1.0.3", "Upload app.js to the default deployment for app \"MyApp\" with the minimum required semver compliant app store version of 1.0.3") .example("release MyApp ./platforms/ios/www 1.0.3 -d Production", "Upload the \"./platforms/ios/www\" folder and all its contents to the \"Production\" deployment for app \"MyApp\" with the minimum required semver compliant app store version of 1.0.3") @@ -212,7 +212,7 @@ var argv = yargs.usage(USAGE_PREFIX + " ") .command("logout", "Log out of the current session", (yargs: yargs.Argv) => { isValidCommandCategory = true; isValidCommand = true; - yargs.usage(USAGE_PREFIX + " logout [--local ]") + yargs.usage(USAGE_PREFIX + " logout [--local]") .demand(/*count*/ 1, /*max*/ 1) // Require exactly one non-option argument. .example("logout", "Log out and also remove the access key used for the current session.") .example("logout --local", "Log out but allow the use of the same access key for future logins.")