Skip to content

Commit 3ed6e7f

Browse files
azizkprincemaple
authored andcommitted
Commands: pipe stderr to stdout.
1 parent 930b64f commit 3ed6e7f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

commands/mix_format.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def call_mix_format(window, **kwargs):
8282
)
8383
return
8484

85-
proc = subprocess.Popen(cmd, cwd=cwd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
85+
proc = subprocess.Popen(cmd, cwd=cwd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
8686

8787
panel_name = 'mix_format'
8888
panel_params = {'panel': 'output.%s' % panel_name}
@@ -93,14 +93,14 @@ def call_mix_format(window, **kwargs):
9393
panel_update_interval = 2
9494

9595
while proc.poll() is None:
96-
stderr_line = proc.stderr.readline().decode(encoding='UTF-8')
96+
line = proc.stdout.readline().decode(encoding='UTF-8')
9797

98-
if stderr_line:
98+
if line:
9999
if not output_view:
100100
output_view = create_mix_format_panel(window, panel_name, cmd, cwd)
101101
window.run_command('show_panel', panel_params)
102102

103-
output_view.run_command('append', {'characters': stderr_line})
103+
output_view.run_command('append', {'characters': line})
104104

105105
if now() - past_timestamp > panel_update_interval:
106106
output_view.show(output_view.size())

commands/mix_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ def write_output(txt):
564564
)
565565
return
566566

567-
proc = subprocess.Popen(cmd_args, cwd=cwd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
567+
proc = subprocess.Popen(cmd_args, cwd=cwd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
568568

569569
if output_view:
570570
output_view.settings().set('view_id', output_view.id())

0 commit comments

Comments
 (0)