diff --git a/README.md b/README.md index 5a771ca..4b2a37f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Troop v0.9.6 +# Troop v0.9.8 ## Real-time collaborative live coding diff --git a/src/interpreter.py b/src/interpreter.py index c3a9385..8b121a9 100644 --- a/src/interpreter.py +++ b/src/interpreter.py @@ -14,6 +14,9 @@ from subprocess import PIPE, STDOUT from datetime import datetime +import subprocess +import os + # Import OSC library depending on Python version if PY_VERSION == 2: @@ -390,7 +393,10 @@ def start(self): try: - process = Popen(["ghc-pkg", "field", "tidal", "data-dir"], stdout=PIPE, universal_newlines=True) + + ghc_numver = 'ghc-' + subprocess.run(['ghc', '--numeric-version'], stdout=subprocess.PIPE).stdout.decode('utf-8').rstrip() + pack_db = os.environ["HOME"] + "/.cabal/store/" + ghc_numver + "/package.db" + process = Popen(["ghc-pkg", "field", "-f", pack_db, "tidal", "data-dir"], stdout=PIPE, universal_newlines=True) output = process.communicate()[0] @@ -679,4 +685,4 @@ def stop_sound(cls): DUMMY : DummyInterpreter } for lang_id, lang_cls in langtypes.items(): - lang_cls.id = lang_id \ No newline at end of file + lang_cls.id = lang_id