fix(create-pca): update usage text and remove redundant app-name option
This commit is contained in:
@@ -33,9 +33,8 @@ function runAz(args, options = {}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
const usageText = `Usage: ${path.basename(process.argv[1])} [options] [app-name]
|
const usageText = `Usage: ${path.basename(process.argv[1])} [options] <app-name>
|
||||||
Options:
|
Options:
|
||||||
-n, --app-name <name> Application display name (optional if positional app-name is provided)
|
|
||||||
-c, --config <path> Write config template to file (optional)
|
-c, --config <path> Write config template to file (optional)
|
||||||
-h, --help Show this help message and exit`;
|
-h, --help Show this help message and exit`;
|
||||||
let values;
|
let values;
|
||||||
@@ -45,7 +44,6 @@ Options:
|
|||||||
args: process.argv.slice(2),
|
args: process.argv.slice(2),
|
||||||
options: {
|
options: {
|
||||||
help: { type: "boolean", short: "h" },
|
help: { type: "boolean", short: "h" },
|
||||||
"app-name": { type: "string", short: "n" },
|
|
||||||
config: { type: "string", short: "c" },
|
config: { type: "string", short: "c" },
|
||||||
},
|
},
|
||||||
strict: true,
|
strict: true,
|
||||||
@@ -70,7 +68,7 @@ Options:
|
|||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
const appName = values["app-name"] || positionals[0] || "";
|
const appName = positionals[0] || "";
|
||||||
const configPath = values.config || "";
|
const configPath = values.config || "";
|
||||||
|
|
||||||
if (!appName) {
|
if (!appName) {
|
||||||
|
|||||||
Reference in New Issue
Block a user