Prune blank args

This commit is contained in:
HaveAGitGat 2023-10-11 07:25:14 +01:00
parent 9e0812b143
commit d9d03b9517
4 changed files with 14 additions and 9 deletions

View file

@ -244,7 +244,8 @@ class CLI {
const cliExitCode: number = await new Promise((resolve) => {
try {
const opts = this.config.spawnOpts || {};
const thread = childProcess.spawn(this.config.cli, this.config.spawnArgs, opts);
const spawnArgs = this.config.spawnArgs.map((row) => row.trim()).filter((row) => row !== '');
const thread = childProcess.spawn(this.config.cli, spawnArgs, opts);
thread.stdout.on('data', (data: string) => {
// eslint-disable-next-line no-console