Skip to content

Commit aa338ac

Browse files
committed
Fix stdin position in stdio array
1 parent b91d0c3 commit aa338ac

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/concurrently.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ it('uses hide from options for each command', () => {
318318
expect(spawn).toHaveBeenCalledWith(
319319
'kill',
320320
expect.objectContaining({
321-
stdio: ['ignore', 'ignore', 'pipe'],
321+
stdio: ['pipe', 'ignore', 'ignore'],
322322
}),
323323
);
324324
});
@@ -339,7 +339,7 @@ it('hides output for commands even if raw option is on', () => {
339339
expect(spawn).toHaveBeenCalledWith(
340340
'kill',
341341
expect.objectContaining({
342-
stdio: ['ignore', 'ignore', 'pipe'],
342+
stdio: ['pipe', 'ignore', 'ignore'],
343343
}),
344344
);
345345
});

src/spawn.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe('getSpawnOpts()', () => {
3636
});
3737

3838
it('sets stdio to ignore stdout + stderr when stdio mode is hidden', () => {
39-
expect(getSpawnOpts({ stdio: 'hidden' }).stdio).toEqual(['ignore', 'ignore', 'pipe']);
39+
expect(getSpawnOpts({ stdio: 'hidden' }).stdio).toEqual(['pipe', 'ignore', 'ignore']);
4040
});
4141

4242
it('sets an ipc channel at the specified descriptor index', () => {

src/spawn.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export const getSpawnOpts = ({
7777
? ['pipe', 'pipe', 'pipe']
7878
: stdio === 'raw'
7979
? ['inherit', 'inherit', 'inherit']
80-
: ['ignore', 'ignore', 'pipe'];
80+
: ['pipe', 'ignore', 'ignore'];
8181

8282
if (ipc != null) {
8383
// Avoid overriding the stdout/stderr/stdin

0 commit comments

Comments
 (0)