Skip to content

Commit bea0270

Browse files
patch node-pty on windows
1 parent 14e7679 commit bea0270

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

app/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
"email": "team@zeit.co"
1010
},
1111
"repository": "zeit/hyper",
12+
"scripts": {
13+
"postinstall": "npx patch-package"
14+
},
1215
"dependencies": {
1316
"@babel/parser": "7.22.5",
1417
"@electron/remote": "2.0.10",

app/patches/node-pty+1.0.0.patch

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
diff --git a/node_modules/node-pty/src/win/conpty.cc b/node_modules/node-pty/src/win/conpty.cc
2+
index 47af75c..884d542 100644
3+
--- a/node_modules/node-pty/src/win/conpty.cc
4+
+++ b/node_modules/node-pty/src/win/conpty.cc
5+
@@ -472,10 +472,6 @@ static NAN_METHOD(PtyKill) {
6+
}
7+
}
8+
9+
- DisconnectNamedPipe(handle->hIn);
10+
- DisconnectNamedPipe(handle->hOut);
11+
- CloseHandle(handle->hIn);
12+
- CloseHandle(handle->hOut);
13+
CloseHandle(handle->hShell);
14+
}
15+

webpack.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ const config: webpack.Configuration[] = [
5757
{
5858
from: './app/static',
5959
to: './static'
60+
},
61+
{
62+
from: './app/patches',
63+
to: './patches'
6064
}
6165
]
6266
})

0 commit comments

Comments
 (0)