Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4a2e184

Browse filesBrowse files
joyeecheungaduh95
authored andcommitted
sea: print error information when fs operations fail
PR-URL: #61581 Refs: #61579 Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
1 parent dce6570 commit 4a2e184
Copy full SHA for 4a2e184

2 files changed

+9-5Lines changed: 9 additions & 5 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/node_sea_bin.cc‎

Copy file name to clipboardExpand all lines: src/node_sea_bin.cc
+8-4Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,10 @@ ExitCode BuildSingleExecutable(const std::string& sea_config_path,
395395
uv_fs_t req;
396396
int r = uv_fs_stat(nullptr, &req, config.executable_path.c_str(), nullptr);
397397
if (r != 0) {
398-
FPrintF(
399-
stderr, "Error: Couldn't stat executable %s\n", config.executable_path);
398+
FPrintF(stderr,
399+
"Error: Couldn't stat executable %s: %s\n",
400+
config.executable_path,
401+
uv_strerror(r));
400402
uv_fs_req_cleanup(&req);
401403
return ExitCode::kGenericUserError;
402404
}
@@ -406,8 +408,10 @@ ExitCode BuildSingleExecutable(const std::string& sea_config_path,
406408
std::string exe;
407409
r = ReadFileSync(&exe, config.executable_path.c_str());
408410
if (r != 0) {
409-
FPrintF(
410-
stderr, "Error: Couldn't read executable %s\n", config.executable_path);
411+
FPrintF(stderr,
412+
"Error: Couldn't read executable %s: %s\n",
413+
config.executable_path,
414+
uv_strerror(r));
411415
return ExitCode::kGenericUserError;
412416
}
413417

Collapse file

‎test/sea/test-build-sea-invalid-executable.js‎

Copy file name to clipboardExpand all lines: test/sea/test-build-sea-invalid-executable.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ skipIfBuildSEAIsNotSupported();
7070
cwd: tmpdir.path,
7171
}, {
7272
status: 1,
73-
stderr: /Couldn't stat executable.*\/nonexistent\/path\/to\/node/,
73+
stderr: /Couldn't stat executable.*\/nonexistent\/path\/to\/node: no such file or directory/,
7474
});
7575
}
7676

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.