Skip to content

Commit

Permalink
Merge pull request #46 from nathanross/lint-windows
Browse files Browse the repository at this point in the history
call Heroku Toolbelt in shell mode on windows
  • Loading branch information
dcarroll authored Jul 10, 2016
2 parents d0ba4f0 + c4454dd commit 5abc50b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions auralint.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"""
import json
import os
import shlex
import subprocess

import sublime
Expand All @@ -15,7 +16,7 @@
settings = sublime.load_settings("Lightning.sublime-settings")
FLAKE_DIR = os.path.dirname(os.path.abspath(__file__))
ERRORS_IN_VIEWS = {}

IS_WINDOWS = os.name == 'nt'

def update_statusbar(view):
"""Update status bar with error."""
Expand Down Expand Up @@ -64,10 +65,12 @@ def run(self, edit):

folders = self.view.window().folders()
print("Folders are " + folders[0])
quote = lambda x: shlex.quote(x) if IS_WINDOWS else x
p = subprocess.Popen(["heroku", "lightning:lint",
folders[0], "--files", filename, "--json"],
quote(folders[0]), "--files", quote(filename), "--json"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stderr=subprocess.PIPE,
shell=IS_WINDOWS)
print("Calling for results.")
results, err = p.communicate()
if err:
Expand Down

0 comments on commit 5abc50b

Please sign in to comment.