From 61ceb039624130b75e7200150d6aa53a878e0fbe Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Sat, 12 Mar 2022 18:54:19 +0100 Subject: [PATCH] fix(core): update --- ts/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ts/index.ts b/ts/index.ts index d7455b5..d1e123c 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -19,6 +19,8 @@ export const runCli = async () => { executor: 'bash' }); + // note: -> reduce on emtpy array does not work + // thus check needed before reducing the argv array smartshellInstance.exec(`node --loader ${tsNodeLoaderPath} ${pathToLoad} ${process.argv.length > 0 ? process.argv.reduce((prevArg, currentArg) => { return prevArg + ' ' + currentArg; }) : ''}`);