Skip to content

Commit ea9346b

Browse files
Take "batch" setting from config into account (#557)
Co-authored-by: Lieven De Foor <lieven.de.foor@tvh.com>
1 parent ed809a5 commit ea9346b

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

src/ABLExec.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ function getDefaultCommand (cfg: ABLUnitConfig, dlc: IDlc, propath: PropathParse
5252

5353
const executable = dlc.uri.fsPath.replace(/\\/g, '/') + '/bin/' + cfg.ablunitConfig.command.executable
5454

55-
const cmd = [ executable, '-b', '-p', execFile ]
55+
const cmd = [ executable, '-p', execFile ]
56+
57+
if (cfg.ablunitConfig.command.batch) {
58+
cmd.push('-b')
59+
}
5660

5761
process.env['PROPATH'] = propath.toString().replace(/\$\{DLC\}/g, dlc.uri.fsPath.replace(/\\/g, '/'))
5862

src/ABLUnitRun.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,11 @@ function getDefaultCommand (res: ABLResults) {
124124

125125
const executable = res.dlc.uri.fsPath.replace(/\\/g, '/') + '/bin/' + res.cfg.ablunitConfig.command.executable
126126

127-
const cmd = [ executable, '-b', '-p', res.wrapperUri.fsPath.replace(/\\/g, '/') ]
127+
const cmd = [ executable, '-p', res.wrapperUri.fsPath.replace(/\\/g, '/') ]
128+
129+
if (res.cfg.ablunitConfig.command.batch) {
130+
cmd.push('-b')
131+
}
128132

129133
process.env['PROPATH'] = res.propath.toString().replace(/\$\{DLC\}/g, res.dlc.uri.fsPath.replace(/\\/g, '/'))
130134

0 commit comments

Comments
 (0)