Fixed an issue where commands weren't run correctly under mac os.
Added no-sublime-package
This commit is contained in:
parent
70288a4cc2
commit
9530210cc0
8
beau.py
8
beau.py
|
|
@ -1,4 +1,5 @@
|
||||||
import json
|
import json
|
||||||
|
import platform
|
||||||
import sublime
|
import sublime
|
||||||
import sublime_plugin
|
import sublime_plugin
|
||||||
from http.client import responses
|
from http.client import responses
|
||||||
|
|
@ -34,7 +35,7 @@ class BeauCommand(sublime_plugin.TextCommand):
|
||||||
'-c',
|
'-c',
|
||||||
active_view.file_name(),
|
active_view.file_name(),
|
||||||
'--clean-list'
|
'--clean-list'
|
||||||
], stdin=PIPE, stdout=PIPE, stderr=PIPE, shell=True)
|
], stdin=PIPE, stdout=PIPE, stderr=PIPE, shell=self.is_windows())
|
||||||
|
|
||||||
for line in iter(proc.stderr.readline, b''):
|
for line in iter(proc.stderr.readline, b''):
|
||||||
print(line)
|
print(line)
|
||||||
|
|
@ -86,7 +87,7 @@ class BeauCommand(sublime_plugin.TextCommand):
|
||||||
active_view.file_name(),
|
active_view.file_name(),
|
||||||
'-R',
|
'-R',
|
||||||
alias
|
alias
|
||||||
], stdin=PIPE, stdout=PIPE, stderr=PIPE, shell=True)
|
], stdin=PIPE, stdout=PIPE, stderr=PIPE, shell=self.is_windows())
|
||||||
|
|
||||||
for line in iter(proc.stderr.readline, b''):
|
for line in iter(proc.stderr.readline, b''):
|
||||||
print(line)
|
print(line)
|
||||||
|
|
@ -129,3 +130,6 @@ class BeauCommand(sublime_plugin.TextCommand):
|
||||||
ensure_ascii=False
|
ensure_ascii=False
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def is_windows(self):
|
||||||
|
return platform.system() == 'Windows'
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue