MM-54325 Have web app build script return error codes on failure (#24723)

* MM-54325 Have web app build script return error codes on failure

* Make web app --runner option not return an error code
Этот коммит содержится в:
Harrison Healey
2023-10-10 11:17:24 -04:00
коммит произвёл GitHub
родитель bb4aa764bc
Коммит 421fe4b5f0
4 изменённых файлов: 50 добавлений и 14 удалений

Просмотреть файл

@@ -7,7 +7,7 @@ const chalk = require('chalk');
const concurrently = require('concurrently');
const {makeRunner} = require('./runner.js');
const {getPlatformCommands} = require('./utils.js');
const {getExitCode, getPlatformCommands} = require('./utils.js');
async function watchAll(useRunner) {
if (!useRunner) {
@@ -41,9 +41,18 @@ async function watchAll(useRunner) {
}
});
await result;
let exitCode = 0;
try {
await result;
} catch (closeEvents) {
exitCode = getExitCode(closeEvents, 0);
}
return exitCode;
}
const useRunner = process.argv[2] === '--runner' || process.env.MM_USE_WEBAPP_RUNNER;
watchAll(useRunner);
watchAll(useRunner).then((exitCode) => {
process.exit(exitCode);
});