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; }) : ''}`);