aboutsummaryrefslogtreecommitdiff
path: root/src/js/builtins/ProcessObjectInternals.ts
diff options
context:
space:
mode:
authorGravatar dave caruso <me@paperdave.net> 2023-09-28 03:53:24 -0700
committerGravatar GitHub <noreply@github.com> 2023-09-28 03:53:24 -0700
commit387f1260c9dc0cea667b44ec0152fff0cd4def25 (patch)
tree24dde83cf812481b6d1c8de316a30ece7b745a54 /src/js/builtins/ProcessObjectInternals.ts
parente60b3607c12c91959ec795228cc299703d5b09d0 (diff)
downloadbun-387f1260c9dc0cea667b44ec0152fff0cd4def25.tar.gz
bun-387f1260c9dc0cea667b44ec0152fff0cd4def25.tar.zst
bun-387f1260c9dc0cea667b44ec0152fff0cd4def25.zip
Get Next.js Pages Router to work (#6095)
* hell * make it so bun-debug-src * teag * wild * yippee * fas * fix async hooks assertions * yap * yeah that's wild * aa * a * increase time allowed * so trivial
Diffstat (limited to 'src/js/builtins/ProcessObjectInternals.ts')
-rw-r--r--src/js/builtins/ProcessObjectInternals.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/js/builtins/ProcessObjectInternals.ts b/src/js/builtins/ProcessObjectInternals.ts
index ef8f1f9ce..aa7c9b783 100644
--- a/src/js/builtins/ProcessObjectInternals.ts
+++ b/src/js/builtins/ProcessObjectInternals.ts
@@ -89,7 +89,8 @@ export function getStdinStream(fd) {
const tty = require("node:tty");
- const stream = new tty.ReadStream(fd);
+ const ReadStream = tty.isatty(fd) ? tty.ReadStream : require("node:fs").ReadStream;
+ const stream = new ReadStream(fd);
const originalOn = stream.on;
stream.on = function (event, listener) {