Skip to content

Commit

Permalink
Fix stdin position in stdio array
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavohenke committed Aug 18, 2024
1 parent b91d0c3 commit aa338ac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/concurrently.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ it('uses hide from options for each command', () => {
expect(spawn).toHaveBeenCalledWith(
'kill',
expect.objectContaining({
stdio: ['ignore', 'ignore', 'pipe'],
stdio: ['pipe', 'ignore', 'ignore'],
}),
);
});
Expand All @@ -339,7 +339,7 @@ it('hides output for commands even if raw option is on', () => {
expect(spawn).toHaveBeenCalledWith(
'kill',
expect.objectContaining({
stdio: ['ignore', 'ignore', 'pipe'],
stdio: ['pipe', 'ignore', 'ignore'],
}),
);
});
Expand Down
2 changes: 1 addition & 1 deletion src/spawn.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('getSpawnOpts()', () => {
});

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

it('sets an ipc channel at the specified descriptor index', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/spawn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const getSpawnOpts = ({
? ['pipe', 'pipe', 'pipe']
: stdio === 'raw'
? ['inherit', 'inherit', 'inherit']
: ['ignore', 'ignore', 'pipe'];
: ['pipe', 'ignore', 'ignore'];

if (ipc != null) {
// Avoid overriding the stdout/stderr/stdin
Expand Down

0 comments on commit aa338ac

Please sign in to comment.