From 9530210cc0a7c2383b848a2a0c8408db41f6e421 Mon Sep 17 00:00:00 2001 From: David Diaz Date: Mon, 23 Oct 2017 10:25:29 -0600 Subject: [PATCH] Fixed an issue where commands weren't run correctly under mac os. Added no-sublime-package --- .no-sublime-package | 0 beau.py | 8 ++++++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 .no-sublime-package diff --git a/.no-sublime-package b/.no-sublime-package new file mode 100644 index 0000000..e69de29 diff --git a/beau.py b/beau.py index b1da313..b879b32 100644 --- a/beau.py +++ b/beau.py @@ -1,4 +1,5 @@ import json +import platform import sublime import sublime_plugin from http.client import responses @@ -34,7 +35,7 @@ class BeauCommand(sublime_plugin.TextCommand): '-c', active_view.file_name(), '--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''): print(line) @@ -86,7 +87,7 @@ class BeauCommand(sublime_plugin.TextCommand): active_view.file_name(), '-R', 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''): print(line) @@ -129,3 +130,6 @@ class BeauCommand(sublime_plugin.TextCommand): ensure_ascii=False ) + def is_windows(self): + return platform.system() == 'Windows' +