From e9116e16f880d327c45235480c7adc881fe7125d Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sun, 9 Jul 2017 12:58:36 -0700 Subject: [PATCH] Fix reporting of errors on Windows When winpty exceptions occurred they were silently failing due to marshal not being initialized. Part of #102 Part of #103 --- src/win/pty.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/win/pty.cc b/src/win/pty.cc index a0f016f..4ab7b4b 100644 --- a/src/win/pty.cc +++ b/src/win/pty.cc @@ -256,6 +256,7 @@ static NAN_METHOD(PtyStartProcess) { std::string conoutPipeNameStr(conoutPipeNameWStr.begin(), conoutPipeNameWStr.end()); marshal->Set(Nan::New("conout").ToLocalChecked(), Nan::New(conoutPipeNameStr).ToLocalChecked()); } + info.GetReturnValue().Set(marshal); goto cleanup; @@ -263,8 +264,6 @@ static NAN_METHOD(PtyStartProcess) { delete filename; delete cmdline; delete cwd; - - info.GetReturnValue().Set(marshal); } /*