From 0eb073dc4c999d1b98b41faf9d39953e857e4f05 Mon Sep 17 00:00:00 2001 From: Waldek Mastykarz Date: Sun, 31 Dec 2017 19:54:49 +0100 Subject: [PATCH] Fixed issue with CLI stuck on the prompt in non-interactive mode solving #142 --- src/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.ts b/src/index.ts index 9cd78fd318a..48bc20604cc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -49,6 +49,10 @@ fs.realpath(__dirname, (err: NodeJS.ErrnoException, resolvedPath: string): void let v: Vorpal | null = null; try { + if (process.argv.length > 2) { + vorpal.delimiter(''); + (vorpal as any).ui.attach(vorpal); + } v = vorpal.parse(process.argv); // if no command has been passed/match, run immersive mode