From e145ec882499b092ec0aea30d3acde23ee3658eb Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Thu, 29 Jan 2026 23:06:43 +0100 Subject: [PATCH 1/2] sea: print error information when fs operations fail --- src/node_sea_bin.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/node_sea_bin.cc b/src/node_sea_bin.cc index 4926f3a894ad35..dc9c9e614f8fca 100644 --- a/src/node_sea_bin.cc +++ b/src/node_sea_bin.cc @@ -395,8 +395,10 @@ ExitCode BuildSingleExecutable(const std::string& sea_config_path, uv_fs_t req; int r = uv_fs_stat(nullptr, &req, config.executable_path.c_str(), nullptr); if (r != 0) { - FPrintF( - stderr, "Error: Couldn't stat executable %s\n", config.executable_path); + FPrintF(stderr, + "Error: Couldn't stat executable %s: %s\n", + config.executable_path, + uv_strerror(r)); uv_fs_req_cleanup(&req); return ExitCode::kGenericUserError; } @@ -406,8 +408,10 @@ ExitCode BuildSingleExecutable(const std::string& sea_config_path, std::string exe; r = ReadFileSync(&exe, config.executable_path.c_str()); if (r != 0) { - FPrintF( - stderr, "Error: Couldn't read executable %s\n", config.executable_path); + FPrintF(stderr, + "Error: Couldn't read executable %s: %s\n", + config.executable_path, + uv_strerror(r)); return ExitCode::kGenericUserError; } From 905a22e8ac96cf6a5c9f3a14b8a1e1035ae577bb Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Fri, 30 Jan 2026 21:34:59 +0100 Subject: [PATCH 2/2] fixup! sea: print error information when fs operations fail --- test/sea/test-build-sea-invalid-executable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sea/test-build-sea-invalid-executable.js b/test/sea/test-build-sea-invalid-executable.js index 29ad029f3285d2..e94a6737aa4bec 100644 --- a/test/sea/test-build-sea-invalid-executable.js +++ b/test/sea/test-build-sea-invalid-executable.js @@ -70,7 +70,7 @@ skipIfBuildSEAIsNotSupported(); cwd: tmpdir.path, }, { status: 1, - stderr: /Couldn't stat executable.*\/nonexistent\/path\/to\/node/, + stderr: /Couldn't stat executable.*\/nonexistent\/path\/to\/node: no such file or directory/, }); }