diff --git a/app/package.json b/app/package.json index 5bd11b65..12760829 100644 --- a/app/package.json +++ b/app/package.json @@ -9,6 +9,9 @@ "email": "team@zeit.co" }, "repository": "zeit/hyper", + "scripts": { + "postinstall": "npx patch-package" + }, "dependencies": { "@babel/parser": "7.22.5", "@electron/remote": "2.0.10", diff --git a/app/patches/node-pty+1.0.0.patch b/app/patches/node-pty+1.0.0.patch new file mode 100644 index 00000000..51f70f2d --- /dev/null +++ b/app/patches/node-pty+1.0.0.patch @@ -0,0 +1,15 @@ +diff --git a/node_modules/node-pty/src/win/conpty.cc b/node_modules/node-pty/src/win/conpty.cc +index 47af75c..884d542 100644 +--- a/node_modules/node-pty/src/win/conpty.cc ++++ b/node_modules/node-pty/src/win/conpty.cc +@@ -472,10 +472,6 @@ static NAN_METHOD(PtyKill) { + } + } + +- DisconnectNamedPipe(handle->hIn); +- DisconnectNamedPipe(handle->hOut); +- CloseHandle(handle->hIn); +- CloseHandle(handle->hOut); + CloseHandle(handle->hShell); + } + diff --git a/webpack.config.ts b/webpack.config.ts index 4bc069a2..750b04f7 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -57,6 +57,10 @@ const config: webpack.Configuration[] = [ { from: './app/static', to: './static' + }, + { + from: './app/patches', + to: './patches' } ] })