Skip to content

Commit fb26425

Browse files
src: improve error message for invalid child stdio type in spawn_sync
1 parent ffc1cf6 commit fb26425

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/spawn_sync.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,10 @@ Maybe<int> SyncProcessRunner::ParseStdioOption(int child_fd,
10551055
return Just(AddStdioInheritFD(child_fd, inherit_fd));
10561056
}
10571057

1058-
UNREACHABLE("invalid child stdio type");
1058+
Utf8Value stdio_type(env()->isolate(), js_type);
1059+
fprintf(stderr, "invalid child stdio type: %s\n", stdio_type.out());
1060+
1061+
UNREACHABLE();
10591062
}
10601063

10611064
int SyncProcessRunner::AddStdioIgnore(uint32_t child_fd) {

0 commit comments

Comments
 (0)