1. Keith Holman
  2. sublime-text-haskell

Commits

Keith Holman  committed 8e9f6b6 Merge

Accepting pull request: Do not use Windows-specific flags when not running on Windows.

  • Participants
  • Parent commits 7175330, 1a3e28a
  • Branches default

Comments (0)

Files changed (1)

File common.py

View file
     """Run the specified command, block until it completes, and return
     the exit code, stdout, and stderr.
     Additional parameters to Popen can be specified as keyword parameters."""
-    startupinfo = subprocess.STARTUPINFO()
-    startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
+    if subprocess.mswindows:
+        startupinfo = subprocess.STARTUPINFO()
+        startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
+        popen_kwargs['startupinfo'] = startupinfo
     process = subprocess.Popen(
         command,
         stdout=subprocess.PIPE,
         stderr=subprocess.PIPE,
-        startupinfo=startupinfo,
         **popen_kwargs)
     stdout, stderr = process.communicate()
     exit_code = process.wait()