Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
sea: print error information when fs operations fail
  • Loading branch information
joyeecheung committed Jan 29, 2026
commit e145ec882499b092ec0aea30d3acde23ee3658eb
12 changes: 8 additions & 4 deletions src/node_sea_bin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}

Expand Down
Loading