diff --git a/src/ABLExec.ts b/src/ABLExec.ts index fb791c9e..cb51a824 100644 --- a/src/ABLExec.ts +++ b/src/ABLExec.ts @@ -52,7 +52,11 @@ function getDefaultCommand (cfg: ABLUnitConfig, dlc: IDlc, propath: PropathParse const executable = dlc.uri.fsPath.replace(/\\/g, '/') + '/bin/' + cfg.ablunitConfig.command.executable - const cmd = [ executable, '-b', '-p', execFile ] + const cmd = [ executable, '-p', execFile ] + + if (cfg.ablunitConfig.command.batch) { + cmd.push('-b') + } process.env['PROPATH'] = propath.toString().replace(/\$\{DLC\}/g, dlc.uri.fsPath.replace(/\\/g, '/')) diff --git a/src/ABLUnitRun.ts b/src/ABLUnitRun.ts index b3b44874..cdaacf8f 100644 --- a/src/ABLUnitRun.ts +++ b/src/ABLUnitRun.ts @@ -124,7 +124,11 @@ function getDefaultCommand (res: ABLResults) { const executable = res.dlc.uri.fsPath.replace(/\\/g, '/') + '/bin/' + res.cfg.ablunitConfig.command.executable - const cmd = [ executable, '-b', '-p', res.wrapperUri.fsPath.replace(/\\/g, '/') ] + const cmd = [ executable, '-p', res.wrapperUri.fsPath.replace(/\\/g, '/') ] + + if (res.cfg.ablunitConfig.command.batch) { + cmd.push('-b') + } process.env['PROPATH'] = res.propath.toString().replace(/\$\{DLC\}/g, res.dlc.uri.fsPath.replace(/\\/g, '/'))