Skip to content

Commit

Permalink
Fixed issue with prompts in non-interactive mode solving pnp#142
Browse files Browse the repository at this point in the history
  • Loading branch information
waldekmastykarz committed Jan 5, 2018
1 parent 02febc7 commit 590254e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
22 changes: 10 additions & 12 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down

0 comments on commit 590254e

Please sign in to comment.