From e145ec882499b092ec0aea30d3acde23ee3658eb Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Thu, 29 Jan 2026 23:06:43 +0100 Subject: [PATCH] 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; }