Skip to content

Commit 7c34e58

Browse files
authored
Merge pull request #849 from microsoft/845
Pass error details in apple spawn exception
2 parents 1a627f4 + 58ba636 commit 7c34e58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/unix/pty.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ Napi::Value PtyFork(const Napi::CallbackInfo& info) {
370370
int err = -1;
371371
pty_posix_spawn(argv, env, term, &winp, &master, &pid, &err);
372372
if (err != 0) {
373-
throw Napi::Error::New(napiEnv, "posix_spawnp failed.");
373+
throw Napi::Error::New(napiEnv, std::string("pty_posix_spawn failed with error: ") + std::to_string(err) + " (" + strerror(err) + ")");
374374
}
375375
if (pty_nonblock(master) == -1) {
376376
throw Napi::Error::New(napiEnv, "Could not set master fd to nonblocking.");

0 commit comments

Comments
 (0)