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 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 + } +}