Skip to content

Commit e9ef161

Browse files
committed
Allow build output to be received as strings or bytes
Sublime Text 3 r3153 changed the ExecCommand base class to return data as decoded strings, rather than bytes that need to be decoded. In order to support both old and new versions of Sublime Text 3, we must support both of these APIs. Longer-term, it's probably a good idea to move away from an ExecCommand subclass.
1 parent a61a582 commit e9ef161

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

elm_make.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ def style_output(self, syntax):
5050
self.debug_text = get_string('make.missing_plugin')
5151

5252
def on_data(self, proc, data):
53-
self.buffer += data
53+
# ST3 ExecCommand base class changed from receiving bytes to str
54+
if isinstance(data, str):
55+
self.buffer += data
56+
else:
57+
self.buffer += data.decode(self.encoding)
5458

5559
def on_finished(self, proc):
5660
result_strs = self.buffer.split('\n')

messages/0.22.2.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
New in Elm Language Support 0.22.2 (Mar 24, 2018)
2+
3+
- Fix: Restore build system compatibility with Sublime Text 3 releases prior to r3153.

0 commit comments

Comments
 (0)