From c961a81603c9c24f867ad69d43e9998442805a9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kr=C3=A6n=20Hansen?= Date: Mon, 29 Apr 2024 10:10:17 +0200 Subject: [PATCH] Using process.exitCode instead of process.exit --- bindgen/src/program.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bindgen/src/program.ts b/bindgen/src/program.ts index 11c353befd8..c06560815ae 100644 --- a/bindgen/src/program.ts +++ b/bindgen/src/program.ts @@ -109,9 +109,9 @@ program optInSpec = parseOptInSpec(optInPath); } generate({ rawSpec, optInSpec, template: await template, outputPath }); - process.exit(0); } catch (err) { printError(err); + process.exitCode = 1; } }); @@ -122,8 +122,8 @@ program.command("generate-schema").action(() => { } catch (err) { printError(err); process.exitCode = 1; - } - }); + } +}); program .command("validate") @@ -138,9 +138,8 @@ program try { parseSpecs(specPaths); console.log(chalk.green("Validation passed!")); - process.exit(0); } catch (err) { printError(err); - process.exit(1); + process.exitCode = 1; } });