diff --git a/node_modules/node-pty/binding.gyp b/node_modules/node-pty/binding.gyp index 79a93e7..efb0a3f 100644 --- a/node_modules/node-pty/binding.gyp +++ b/node_modules/node-pty/binding.gyp @@ -18,6 +18,9 @@ ] } }, + 'defines': [ + 'NOMINMAX' + ] }], ], }, diff --git a/node_modules/node-pty/src/win/winpty.cc b/node_modules/node-pty/src/win/winpty.cc index b054dee..a094b1c 100644 --- a/node_modules/node-pty/src/win/winpty.cc +++ b/node_modules/node-pty/src/win/winpty.cc @@ -164,7 +164,7 @@ static NAN_METHOD(PtyStartProcess) { Nan::ThrowError(why.str().c_str()); goto cleanup; } - + { int cols = info[4]->Int32Value(Nan::GetCurrentContext()).FromJust(); int rows = info[5]->Int32Value(Nan::GetCurrentContext()).FromJust(); bool debug = Nan::To(info[6]).FromJust(); @@ -179,6 +179,7 @@ static NAN_METHOD(PtyStartProcess) { throw_winpty_error("Error creating WinPTY config", error_ptr); goto cleanup; } + { winpty_error_free(error_ptr); // Set pty size on config @@ -215,7 +216,7 @@ static NAN_METHOD(PtyStartProcess) { winpty_error_free(error_ptr); // Set return values - v8::Local marshal = Nan::New(); + {v8::Local marshal = Nan::New(); Nan::Set(marshal, Nan::New("innerPid").ToLocalChecked(), Nan::New((int)GetProcessId(handle))); Nan::Set(marshal, Nan::New("innerPidHandle").ToLocalChecked(), Nan::New((int)handle)); Nan::Set(marshal, Nan::New("pid").ToLocalChecked(), Nan::New((int)winpty_agent_process(pc))); @@ -232,7 +233,7 @@ static NAN_METHOD(PtyStartProcess) { Nan::Set(marshal, Nan::New("conout").ToLocalChecked(), Nan::New(conoutPipeNameStr).ToLocalChecked()); } info.GetReturnValue().Set(marshal); - + }}} goto cleanup; cleanup: