Commit 7d30720
authored
CLI: Fix -it not being able to pipe stdout (apple#951)
Fixes apple#949
Typically if one fd is a tty, it's common for all 3 of stdio to be the
same, but that is not always the case. In our case we were using our
Terminal type from Containerization to comb through err/out/in and give
us a type backed by one of the 3 if -t was supplied. It happens that
stderr is the first we check, so our Terminal() is backed by fd 2. This
change modifies things so that we always initialize our Terminal if
asked for with fd 0, and out/err are backed by their corresponding
correct fd number.
## Type of Change
- [x] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
- [x] Tested locally
- [ ] Added/updated tests
- [ ] Added/updated docs1 parent a2901e0 commit 7d30720
1 file changed
+3
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | 97 | | |
| 98 | + | |
| 99 | + | |
104 | 100 | | |
105 | 101 | | |
106 | 102 | | |
| |||
111 | 107 | | |
112 | 108 | | |
113 | 109 | | |
114 | | - | |
115 | 110 | | |
116 | 111 | | |
117 | 112 | | |
| |||
0 commit comments