Skip to content

Fix input with inherited stdin#1232

Merged
sindresorhus merged 1 commit into
sindresorhus:mainfrom
puneetdixit200:fix-input-inherited-stdin
Jul 1, 2026
Merged

Fix input with inherited stdin#1232
sindresorhus merged 1 commit into
sindresorhus:mainfrom
puneetdixit200:fix-input-inherited-stdin

Conversation

@puneetdixit200

Copy link
Copy Markdown
Contributor

Fixes #1219

Summary

  • Ignore a singular inherited stdin source when input or inputFile is provided, so explicit input becomes the only stdin source.
  • Preserve explicit multi-source stdin arrays such as ['inherit', 'pipe'].
  • Add nested regression coverage for stdin and stdio forms in async and sync modes.

Tests

  • npm_config_cache=/tmp/execa-npm-cache npx ava test/io/input-option.js --match='*input option ignores*'
  • npm_config_cache=/tmp/execa-npm-cache npx ava test/io/input-option.js test/stdio/native-inherit-pipe.js test/stdio/file-path-main.js
  • npm_config_cache=/tmp/execa-npm-cache npm run lint
  • npm_config_cache=/tmp/execa-npm-cache npm run type
  • git diff --check

@ehmicky ehmicky self-requested a review May 22, 2026 18:31
@ehmicky

ehmicky commented May 22, 2026

Copy link
Copy Markdown
Collaborator

Hi @puneetdixit200,

Thanks a lot!
Perfect PR, nothing to fault! 👍

This is technically a breaking change, so would require a major release.
We should combine the next major release with dropping support for Node 18 and 20.
We should also fix #1233 (run tests on Node 26) as well.

To allow other non-breaking PRs to still be merged until we do the above, then we probably should wait to merge this PR, but mark it as ready to merge.
@sindresorhus Thoughts?

@sindresorhus sindresorhus merged commit 3ed0544 into sindresorhus:main Jul 1, 2026
8 checks passed
@sindresorhus

Copy link
Copy Markdown
Owner

We can start work on the next major now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix using both stdin: 'inherit' and input options

3 participants