From d5434e5c60387b6a06851557213ce88c250906d5 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Wed, 18 Jun 2025 17:07:44 +0200 Subject: [PATCH 1/2] Pass the rewatch exit code through in wrapper script --- cli/rewatch.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/cli/rewatch.js b/cli/rewatch.js index 6df646ed4b..7eae74aed1 100755 --- a/cli/rewatch.js +++ b/cli/rewatch.js @@ -7,6 +7,14 @@ import { rewatch_exe, bsc_exe } from "./common/bins.js"; const args = process.argv.slice(2); -child_process.spawnSync(rewatch_exe, [...args, "--bsc-path", bsc_exe], { - stdio: "inherit", -}); +try { + child_process.execFileSync(rewatch_exe, [...args, "--bsc-path", bsc_exe], { + stdio: "inherit", + }); +} catch (err) { + if (err.status !== undefined) { + process.exit(err.status); // Pass through the exit code + } else { + process.exit(1); // Generic error + } +} From 2bef15b6d5407963f92ae73f5cb69bedddc6e73d Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Thu, 19 Jun 2025 09:40:27 +0200 Subject: [PATCH 2/2] CHANGELOG --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18564c2ed8..2bf84b1677 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,9 @@ # 12.0.0-alpha.15 (Unreleased) #### :bug: Bug fix -- ignore inferred arity in functions inside `%raw` functions, leaving to `%ffi` the responsibility to check the arity since it gives an error in case of mismatch. https://github.com/rescript-lang/rescript/pull/7542 + +- Ignore inferred arity in functions inside `%raw` functions, leaving to `%ffi` the responsibility to check the arity since it gives an error in case of mismatch. https://github.com/rescript-lang/rescript/pull/7542 +- Pass the rewatch exit code through in wrapper script. https://github.com/rescript-lang/rescript/pull/7565 #### :nail_care: Polish