From 99826821ed37757db5c1c65537762dc4f2db0786 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 61618b43d19..7a6c7be313e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -64,6 +64,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