Use spawn not exec to run commands (#88)

* minor: use spawn to stream larger output rather than exec which buffers it

* test: verify distinct error code is returned from large output test

* test: breakout additional integration tests to run in parallel

* test: dont pass/fail PRs for coverage yet
This commit is contained in:
Nick Fields
2022-08-03 23:02:05 -04:00
committed by GitHub
parent a25f198007
commit 616fa81820
7 changed files with 196 additions and 81 deletions

4
dist/index.js vendored
View File

@@ -778,8 +778,8 @@ function runCmd(attempt) {
done = false;
(0, core_1.debug)("Running command ".concat(COMMAND, " on ").concat(OS, " using shell ").concat(executable));
child = attempt > 1 && NEW_COMMAND_ON_RETRY
? (0, child_process_1.exec)(NEW_COMMAND_ON_RETRY, { shell: executable })
: (0, child_process_1.exec)(COMMAND, { shell: executable });
? (0, child_process_1.spawn)(NEW_COMMAND_ON_RETRY, { shell: executable })
: (0, child_process_1.spawn)(COMMAND, { shell: executable });
(_a = child.stdout) === null || _a === void 0 ? void 0 : _a.on('data', function (data) {
process.stdout.write(data);
});