File tree 2 files changed +14
-15
lines changed
2 files changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -191,21 +191,6 @@ export async function loadBindings(): Promise<Binding> {
191
191
if ( pendingBindings ) {
192
192
return pendingBindings
193
193
}
194
-
195
- if ( process . platform === 'darwin' ) {
196
- // rust needs stdout to be blocking, otherwise it will throw an error (on macOS at least) when writing a lot of data (logs) to it
197
- // see https://github.com/napi-rs/napi-rs/issues/1630
198
- // and https://github.com/nodejs/node/blob/main/doc/api/process.md#a-note-on-process-io
199
- if ( process . stdout . _handle != null ) {
200
- // @ts -ignore
201
- process . stdout . _handle . setBlocking ( true )
202
- }
203
- if ( process . stderr . _handle != null ) {
204
- // @ts -ignore
205
- process . stderr . _handle . setBlocking ( true )
206
- }
207
- }
208
-
209
194
const isCustomTurbopack = await __isCustomTurbopackBinary ( )
210
195
pendingBindings = new Promise ( async ( resolve , _reject ) => {
211
196
if ( ! lockfilePatchPromise . cur ) {
Original file line number Diff line number Diff line change @@ -342,6 +342,20 @@ const nextDev: CliCommand = async (argv) => {
342
342
)
343
343
}
344
344
345
+ if ( process . platform === 'darwin' ) {
346
+ // rust needs stdout to be blocking, otherwise it will throw an error (on macOS at least) when writing a lot of data (logs) to it
347
+ // see https://github.com/napi-rs/napi-rs/issues/1630
348
+ // and https://github.com/nodejs/node/blob/main/doc/api/process.md#a-note-on-process-io
349
+ if ( process . stdout . _handle != null ) {
350
+ // @ts -ignore
351
+ process . stdout . _handle . setBlocking ( true )
352
+ }
353
+ if ( process . stderr . _handle != null ) {
354
+ // @ts -ignore
355
+ process . stderr . _handle . setBlocking ( true )
356
+ }
357
+ }
358
+
345
359
// Turbopack need to be in control over reading the .env files and watching them.
346
360
// So we need to start with a initial env to know which env vars are coming from the user.
347
361
resetEnv ( )
You can’t perform that action at this time.
0 commit comments