Created
March 16, 2017 18:47
-
-
Save drathier/401156ed58cb58c19396cde702766c29 to your computer and use it in GitHub Desktop.
A Python script that runs elm-test, so you can elm-test without leaving PyCharm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import sys | |
import os | |
try: # windows | |
x = subprocess.run([os.environ['USERPROFILE'] + r"\AppData\Roaming\npm\elm-test.cmd"], stdout=subprocess.PIPE, | |
stderr=subprocess.PIPE) | |
except: # macos / linux | |
x = subprocess.run([r"/usr/local/bin/elm-test"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) | |
sys.stdout.write(x.stdout.decode("utf-8")) | |
sys.stderr.write(x.stderr.decode("utf-8")) | |
exit(x.returncode) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment