node-pty+1.0.0.patch 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. diff --git a/node_modules/node-pty/binding.gyp b/node_modules/node-pty/binding.gyp
  2. index 79a93e7..efb0a3f 100644
  3. --- a/node_modules/node-pty/binding.gyp
  4. +++ b/node_modules/node-pty/binding.gyp
  5. @@ -18,6 +18,9 @@
  6. ]
  7. }
  8. },
  9. + 'defines': [
  10. + 'NOMINMAX'
  11. + ]
  12. }],
  13. ],
  14. },
  15. diff --git a/node_modules/node-pty/src/win/winpty.cc b/node_modules/node-pty/src/win/winpty.cc
  16. index b054dee..a094b1c 100644
  17. --- a/node_modules/node-pty/src/win/winpty.cc
  18. +++ b/node_modules/node-pty/src/win/winpty.cc
  19. @@ -164,7 +164,7 @@ static NAN_METHOD(PtyStartProcess) {
  20. Nan::ThrowError(why.str().c_str());
  21. goto cleanup;
  22. }
  23. -
  24. + {
  25. int cols = info[4]->Int32Value(Nan::GetCurrentContext()).FromJust();
  26. int rows = info[5]->Int32Value(Nan::GetCurrentContext()).FromJust();
  27. bool debug = Nan::To<bool>(info[6]).FromJust();
  28. @@ -179,6 +179,7 @@ static NAN_METHOD(PtyStartProcess) {
  29. throw_winpty_error("Error creating WinPTY config", error_ptr);
  30. goto cleanup;
  31. }
  32. + {
  33. winpty_error_free(error_ptr);
  34. // Set pty size on config
  35. @@ -215,7 +216,7 @@ static NAN_METHOD(PtyStartProcess) {
  36. winpty_error_free(error_ptr);
  37. // Set return values
  38. - v8::Local<v8::Object> marshal = Nan::New<v8::Object>();
  39. + {v8::Local<v8::Object> marshal = Nan::New<v8::Object>();
  40. Nan::Set(marshal, Nan::New<v8::String>("innerPid").ToLocalChecked(), Nan::New<v8::Number>((int)GetProcessId(handle)));
  41. Nan::Set(marshal, Nan::New<v8::String>("innerPidHandle").ToLocalChecked(), Nan::New<v8::Number>((int)handle));
  42. Nan::Set(marshal, Nan::New<v8::String>("pid").ToLocalChecked(), Nan::New<v8::Number>((int)winpty_agent_process(pc)));
  43. @@ -232,7 +233,7 @@ static NAN_METHOD(PtyStartProcess) {
  44. Nan::Set(marshal, Nan::New<v8::String>("conout").ToLocalChecked(), Nan::New<v8::String>(conoutPipeNameStr).ToLocalChecked());
  45. }
  46. info.GetReturnValue().Set(marshal);
  47. -
  48. + }}}
  49. goto cleanup;
  50. cleanup: