Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Don't capture so much #2460
This fixes #2404, covering another situation I also discovered.
My additional discovery was that stdout and stderr of hiddenobjects are also being captured, which the documentation states shouldn't be happening - http://xon.sh/tutorial.html#uncaptured-subprocess-with-and. I'm slightly less sure about this change, because the code quite explicitly refers to them as captured:
But I think it might a copy-paste thing from nearby code. Either way the capture is definitely causing issues, e.g. here's two invocations of
Given that the documentation states it shouldn't be captured, and with this PR it really isn't captured anymore, I should probably also update the code to state that it's uncaptured. If you find the change agreeable let me know and I'll make those changes.
@@ Coverage Diff @@ ## master #2460 +/- ## ========================================== - Coverage 30.86% 30.59% -0.27% ========================================== Files 97 97 Lines 16338 16340 +2 Branches 3046 3047 +1 ========================================== - Hits 5042 5000 -42 - Misses 10745 10785 +40 - Partials 551 555 +4
Hello All, Thanks for the PR @nathan-hoad! So I think that there might be some confusion over terminology here. un/capturing only refers to whether the output is piped to stdout and stderr. The distinction between
For example on master, we see what I think is the correct behaviour:
scopatz@artemis ~ $ $[echo hello] is None hello True scopatz@artemis ~ $ ![echo hello].out hello 'hello\n'
On this branch, we no longer have access to the full output after the command is run:
scopatz@artemis ~ $ $[echo hello] is None hello True scopatz@artemis ~ $ ![echo hello].out hello ''
Right now, all subprocess commands are automatically wrapped in
PS super sorry about taking so long to get to this.