Skip to content

Commit 7a8f47d

Browse files
committed
Fix login help
1 parent 33d3ad6 commit 7a8f47d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

cli/script/command-parser.ts

+8-4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import * as cli from "../script/types/cli";
66
import * as chalk from "chalk";
77
import backslash = require("backslash");
88
import parseDuration = require("parse-duration");
9+
import AccountManager = require("./management-sdk");
910

1011
const packageJson = require("../../package.json");
1112
const ROLLOUT_PERCENTAGE_REGEX: RegExp = /^(100|[1-9][0-9]|[1-9])%?$/;
@@ -428,10 +429,13 @@ yargs
428429
isValidCommandCategory = true;
429430
isValidCommand = true;
430431
yargs
431-
.usage(USAGE_PREFIX + " login [options]")
432-
.demand(/*count*/ 0, /*max*/ 1) //set 'max' to one to allow usage of serverUrl undocument parameter for testing
433-
.example("login", "Logs in to the CodePush server")
434-
.example("login --accessKey mykey", 'Logs in on behalf of the user who owns and created the access key "mykey"')
432+
.usage(USAGE_PREFIX + " login <serverUrl> [options]")
433+
.demand(/*count*/ 0, /*max*/ 1) //set 'max' to one to allow usage of serverUrl
434+
.example("login", `Logs in to the CodePush server on default serverUrl ${AccountManager.SERVER_URL}`)
435+
.example(
436+
"login https://codepush.example.com --accessKey mykey",
437+
'Logs in on behalf of the user who owns and created the access key "mykey", on the server running at https://codepush.example.com'
438+
)
435439
.option("accessKey", {
436440
alias: "key",
437441
default: null,

0 commit comments

Comments
 (0)