Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow stdin to be a file URL #610

Merged
merged 1 commit into from
Dec 17, 2023
Merged

Allow stdin to be a file URL #610

merged 1 commit into from
Dec 17, 2023

Conversation

ehmicky
Copy link
Collaborator

@ehmicky ehmicky commented Dec 16, 2023

Part of #592.

This allows the stdin option to be a file URL. I will send another PR for stdout/stderr.

This is an alternative implementation: see #614 for using file path strings instead. Should we allow file URLs, file path strings, or both?

  • File path strings are easier for users.
  • File URLs are more "proper" as they are typed and work in browsers.
  • Allowing both is what most Node.js core methods do.

@ehmicky ehmicky marked this pull request as draft December 16, 2023 17:39
@ehmicky ehmicky force-pushed the stdin-file-url branch 2 times, most recently from 24947cb to 0c78008 Compare December 16, 2023 17:50
@ehmicky ehmicky marked this pull request as ready for review December 16, 2023 17:56
@ehmicky ehmicky force-pushed the stdin-file-url branch 2 times, most recently from 8f05d96 to 9dec645 Compare December 16, 2023 21:56
@sindresorhus
Copy link
Owner

We should support both.

@sindresorhus sindresorhus merged commit d37a0f6 into main Dec 17, 2023
14 checks passed
@sindresorhus sindresorhus deleted the stdin-file-url branch December 17, 2023 03:01
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.

None yet

2 participants