From 58ba636b445da97792ea3d0cc13b8f23599a0dba Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Tue, 30 Dec 2025 03:14:38 -0800 Subject: [PATCH] Pass error details in apple spawn exception Part of #845 --- src/unix/pty.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unix/pty.cc b/src/unix/pty.cc index 7b4b9e1f..54631ad5 100644 --- a/src/unix/pty.cc +++ b/src/unix/pty.cc @@ -370,7 +370,7 @@ Napi::Value PtyFork(const Napi::CallbackInfo& info) { int err = -1; pty_posix_spawn(argv, env, term, &winp, &master, &pid, &err); if (err != 0) { - throw Napi::Error::New(napiEnv, "posix_spawnp failed."); + throw Napi::Error::New(napiEnv, std::string("pty_posix_spawn failed with error: ") + std::to_string(err) + " (" + strerror(err) + ")"); } if (pty_nonblock(master) == -1) { throw Napi::Error::New(napiEnv, "Could not set master fd to nonblocking.");