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; } 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/, }); }