From 590254ecfd5234c5fe3c9828a6d73172d35abcd3 Mon Sep 17 00:00:00 2001 From: Waldek Mastykarz Date: Fri, 5 Jan 2018 16:37:46 +0100 Subject: [PATCH] Fixed issue with prompts in non-interactive mode solving #142 --- npm-shrinkwrap.json | 22 ++++++++++------------ package.json | 2 +- src/index.ts | 5 ++++- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 57016a5a0bf..2127a405f70 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -138,7 +138,7 @@ "integrity": "sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=", "requires": { "babel-runtime": "6.26.0", - "core-js": "2.5.1", + "core-js": "2.5.3", "regenerator-runtime": "0.10.5" } }, @@ -147,14 +147,14 @@ "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "requires": { - "core-js": "2.5.1", - "regenerator-runtime": "0.11.0" + "core-js": "2.5.3", + "regenerator-runtime": "0.11.1" }, "dependencies": { "regenerator-runtime": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", - "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A==" + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" } } }, @@ -269,9 +269,9 @@ "dev": true }, "core-js": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.1.tgz", - "integrity": "sha1-rmh03GaTd4m4B1T/VCjfZoGcpQs=" + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz", + "integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4=" }, "core-util-is": { "version": "1.0.2", @@ -2760,9 +2760,7 @@ } }, "vorpal": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/vorpal/-/vorpal-1.12.0.tgz", - "integrity": "sha1-S+eypOSPj8/JzzZIxBnTEcUiFZ0=", + "version": "github:pnp/vorpal#83d28bfd317dbbe7588bb1a17287a5adcf60c9c8", "requires": { "babel-polyfill": "6.26.0", "chalk": "1.1.3", diff --git a/package.json b/package.json index db9647a6250..6b964f21631 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "easy-table": "^1.1.0", "omelette": "^0.4.5", "request-promise-native": "^1.0.5", - "vorpal": "^1.12.0" + "vorpal": "github:pnp/vorpal" }, "devDependencies": { "@types/easy-table": "0.0.31", diff --git a/src/index.ts b/src/index.ts index 61618b43d19..e504bc25592 100644 --- a/src/index.ts +++ b/src/index.ts @@ -64,12 +64,15 @@ fs.realpath(__dirname, (err: NodeJS.ErrnoException, resolvedPath: string): void let v: Vorpal | null = null; try { + if (process.argv.length > 2) { + vorpal.delimiter(''); + } v = vorpal.parse(process.argv); // if no command has been passed/match, run immersive mode if (!v._command) { vorpal - .delimiter(chalk.red(config.delimiter)) + .delimiter(chalk.red(config.delimiter + ' ')) .show(); } }