mirror of
https://github.com/webrecorder/browsertrix-crawler.git
synced 2025-10-19 14:33:17 +00:00
Make sure all exit calls use ExitCodes enum (#767)
Quick follow-up to #584 to make sure enum is used everywhere in profile editing mode: - profile browser exits with ExitCodes.SignalInterrupted in response to signal - use ExitCodes.Success or GenericError for other exit codes
This commit is contained in:
parent
4b72b7c7dc
commit
f16be32ba6
1 changed files with 3 additions and 3 deletions
|
@ -147,7 +147,7 @@ function getDefaultWindowSize() {
|
||||||
|
|
||||||
function handleTerminate(signame: string) {
|
function handleTerminate(signame: string) {
|
||||||
logger.info(`Got signal ${signame}, exiting`);
|
logger.info(`Got signal ${signame}, exiting`);
|
||||||
process.exit(ExitCodes.GenericError);
|
process.exit(ExitCodes.SignalInterrupted);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
|
@ -299,7 +299,7 @@ async function automatedProfile(
|
||||||
}
|
}
|
||||||
logger.debug("Login form could not be found");
|
logger.debug("Login form could not be found");
|
||||||
await page.close();
|
await page.close();
|
||||||
process.exit(1);
|
process.exit(ExitCodes.GenericError);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -318,7 +318,7 @@ async function automatedProfile(
|
||||||
|
|
||||||
await createProfile(params, browser, page, cdp);
|
await createProfile(params, browser, page, cdp);
|
||||||
|
|
||||||
process.exit(0);
|
process.exit(ExitCodes.Success);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function createProfile(
|
async function createProfile(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue