-
Notifications
You must be signed in to change notification settings - Fork 16
Support stdin and stdout from piped process #33
base: master
Are you sure you want to change the base?
Support stdin and stdout from piped process #33
Conversation
@pecigonzalo thanks for starting work on this issue!
I think we should tackle these 2 issues in different PRs. You do not need to add the ability to parse |
Indeed, im not trying to fix 30, only 32. I was just ensuring I was not removing any previous functionality. Regarding #32 and the |
Only format the content between and output the rest, additionally allowing the user to pass input more clearly.
bdb35b5
to
f9e85ad
Compare
@dmlittle Anything that holds merging this? |
@pecigonzalo sorry for the delayed response, I've been busy these past few weeks and just had time to catch up on this issue. As I mentioned earlier I'm willing to include this functionality as an optional flag but not as the default behavior. I don't necessarily agree with the Unix good citizen argument. The purpose of this tool is to make a As for scenery preventing terraform errors and/or prompts that's a bug and should be fixed. I'll look more into it. |
@dmlittle No worries, I wasnt sure how to proceed.
This is exactly what this change is doing, is covered by it. AFAIK you cant detect other errors/prompts in a generic enough way to craft a "only these prompts" so you cant do this in a flag. You either pass stdin or not, I can make a flag that fixes the issue or not, but not fix the issue and also optionally strip other content from stdin. Event in this case:
Its not behaving and its stripping stderr/stdin content, preventing prompts and errors from going out. |
@dmlittle any comments on this? |
Fixes: #32
Only format the content between
------
and output the rest, additionally allowing the user to pass input more clearly.@dmlittle This a WIP implementation of the changes I requested on #32, I want to clean the code + add tests, but first wanted to check with you, is in scope of this to also format
apply
or onlyplan
? becauseapply
does not output---
.Manual tests
Subproc and input
Test that a subproc and easily show and receive input. Previously, the input was passed, but because we could not see the output, it was hard to tell if we had to pass input, basically it was a bad unix pipe citizen.
New Output:
Previous Output:
Format only between ----
Format only the code between
----
, output the rest to the console, to make it easier to interact and see progress of commands, wrappers and even the initial part of the terraform plan.New Output:
Previous Output: