-
Notifications
You must be signed in to change notification settings - Fork 22
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
Pipe ending in function containing pipes causes negotiation failure #88
Comments
IMO this is a bug: dgsh should not have attempted to negotiate. On the other hand, ou're trying to mix water with oil: having dgsh (rather than bash) execute a script where you've forced commands to be non-dgsh compatible. I assume this is an example of a more complex scenario. What are you trying to achieve? |
The same bug occurs with
The more complex scenario is the script (see also the comment on the gist for details) that I shared near the end of the bug (which includes a multipipe); even though the error that occurs is different, both scripts have a pipeline ending in a function, and in both cases the workaround is to append |
You definitely need cat or a similar gathering command at the end of the multipipe, because |
There already is a |
You are right, it should be the same bug. I have tracked it down and I am working on a solution. |
so that the first and last command in a function get correctly any pipe connections to a function call (pipe_in for first, pipe_out for last) Add two tests for this Fix issue #88
Does it resolve the bug? |
Seems to have fixed it, thanks! |
With the following content in the file
script
,dgsh script
results in the following output:The garbage at the beginning is printed immediately and looks a lot like random memory being dumped. The rest of the output is printed after the five second timeout.
In a similar script, which you can find in this gist, I’ve also encountered an assertion failure:
In both cases, there’s a simple workaround: pipe to
cat
.Might be related to or duplicate of #4.
The text was updated successfully, but these errors were encountered: