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

Have internal/external/pipelines taken an optional InputStream. #1182

Merged
merged 1 commit into from Jan 10, 2020
Merged

Have internal/external/pipelines taken an optional InputStream. #1182

merged 1 commit into from Jan 10, 2020

Conversation

thegedge
Copy link
Contributor

@thegedge thegedge commented Jan 10, 2020

Closes #1173

Stdin pipes are no longer opened for the first external command in a pipeline. I think it also makes far more sense than InputStream::Empty as the starting point for a pipeline.

I was trying to think of how I could write a test to capture this, but nothing came to mind.

Primarily, this fixes an issue where we always open a stdin pipe for
external commands, which can break various interactive commands (e.g.,
editors).
@gitpod-io
Copy link

gitpod-io bot commented Jan 10, 2020

@sophiajt
Copy link
Member

Let's land this. I think it's a good incremental improvement from where we are.

Something I'd like to explore is if we want to push the Option deeper to the commands themselves. I mentioned in the comment we probably want the type checker to check for this, but until then, commands should probably be aware of how they're being run and if they actually have input. If they expect input, and don't get it, they could give a better error than we give today.

@sophiajt sophiajt merged commit 347f91a into nushell:master Jan 10, 2020
@thegedge thegedge deleted the optional-input-streams-for-pipelines branch January 12, 2020 22:55
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.

Calling vi filename now gives warning
2 participants