Skip to content

Commit

Permalink
Added logging statements in execute file.
Browse files Browse the repository at this point in the history
  • Loading branch information
surjikal committed Sep 20, 2013
1 parent f674cc4 commit e96691e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/execute.py
Expand Up @@ -3,6 +3,11 @@
import sublime
import sys

try:
from .utils import log
except ValueError:
from utils import log


PLATFORM_IS_WINDOWS = (sublime.platform() == 'windows')

Expand All @@ -11,12 +16,19 @@ def execute(args, message='', path=None, cwd=None):
# This is needed for Windows... not sure why. See:
# https://github.com/surjikal/sublime-coffee-compile/issues/13
if path:
log('Path:')
log("\n".join(path))
path = os.pathsep.join(path)
if PLATFORM_IS_WINDOWS:
log('Platform is Windows!')
os.environ['PATH'] = path
path = None

env = {'PATH': path} if path else None
log('Env:')
log(env)
log('Args:')
log(args)

process = subprocess.Popen(args,
stdin=subprocess.PIPE,
Expand Down

0 comments on commit e96691e

Please sign in to comment.