Skip to content

Commit 20a928c

Browse files
committed
execFile() for .NET
1 parent b3af0db commit 20a928c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/lib/validators/openApiDiff.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,10 +301,10 @@ export class OpenApiDiff {
301301
throw new Error(`File "${newSwagger}" not found.`)
302302
}
303303

304-
const cmd = `${this.dotNetPath()} ${this.openApiDiffDllPath()} -o ${oldSwagger} -n ${newSwagger}`
304+
const [file, args] = [this.dotNetPath(), [this.openApiDiffDllPath(), "-o", oldSwagger, "-n", newSwagger]]
305305

306-
log.debug(`Executing: "${cmd}"`)
307-
const { stdout } = await exec(cmd, { encoding: "utf8", maxBuffer: 1024 * 1024 * 64 })
306+
log.debug(`Executing: "${file} ${args.join(" ")}"`)
307+
const { stdout } = await execFile(file, args, { encoding: "utf8", maxBuffer: 1024 * 1024 * 64 })
308308
const resultJson = JSON.parse(stdout) as Messages
309309

310310
const updatedJson = resultJson.map(message => ({

0 commit comments

Comments
 (0)