@@ -18,7 +18,7 @@ def run(cmd, args=[], source="", cwd=None, env=None):
18
18
args = [args ]
19
19
if sys .platform == "win32" :
20
20
proc = Popen ([cmd ] + args , env = env , cwd = cwd , stdout = PIPE , stdin = PIPE , stderr = PIPE , shell = True )
21
- stat = proc .communicate (input = source )
21
+ stat = proc .communicate (input = source . encode ( 'utf-8' ) )
22
22
else :
23
23
if env is None :
24
24
env = {"PATH" : settings .get ('binDir' , '/usr/local/bin' )}
@@ -30,7 +30,7 @@ def run(cmd, args=[], source="", cwd=None, env=None):
30
30
proc = Popen (command , env = env , cwd = cwd , stdout = PIPE , stderr = PIPE )
31
31
stat = proc .communicate ()
32
32
okay = proc .returncode == 0
33
- return {"okay" : okay , "out" : stat [0 ], "err" : stat [1 ]}
33
+ return {"okay" : okay , "out" : stat [0 ]. decode ( 'utf-8' ) , "err" : stat [1 ]. decode ( 'utf-8' ) }
34
34
35
35
36
36
def brew (args , source ):
@@ -426,6 +426,7 @@ def run(self, edit):
426
426
panel .set_syntax_file ('Packages/JavaScript/JavaScript.tmLanguage' )
427
427
panel .set_read_only (False )
428
428
output = panel
429
+ # print res["err"]
429
430
430
431
if res ["okay" ] is True :
431
432
edit = output .begin_edit ()
@@ -436,7 +437,7 @@ def run(self, edit):
436
437
else :
437
438
edit = output .begin_edit ()
438
439
output .erase (edit , sublime .Region (0 , output .size ()))
439
- output .insert (edit , 0 , res ["err" ]. split ( " \n " )[ 0 ] )
440
+ output .insert (edit , 0 , res ["err" ])
440
441
output .end_edit (edit )
441
442
output .sel ().clear ()
442
443
output .set_read_only (True )
0 commit comments