-
-
Notifications
You must be signed in to change notification settings - Fork 246
Closed
Description
Consider this code (using node 18.13.0 and execa 6.1.0)
import { execa } from 'execa';
const proc = execa( "does not exist", [], { stdio: [ 'ignore', 'pipe', 'inherit' ], buffer: false } );
proc.stdout.on( 'end', () => console.log( 'stdout ended' ) );
proc.stdout.on( 'close', () => console.log( 'stdout closed' ) );
await proc.catch( e => e );Only "stdout closed" is logged, "stdout ended" never happens.
This does not match the behavior of child_process:
import { spawn } from 'node:child_process';
const proc = spawn( "does not exist", [], { stdio: [ 'ignore', 'pipe', 'inherit' ] } );
proc.stdout.on( 'end', () => console.log( 'stdout ended' ) );
proc.stdout.on( 'close', () => console.log( 'stdout closed' ) );
proc.on( 'error', () => console.log( 'proc error' ) );In this case both "stdout ended" and "stdout closed" fire as expected.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels