Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Paste
P1133
old yarnpkg support
Active
Public
Actions
Authored by
vlorentz
on Aug 25 2021, 1:57 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
diff --git a/setup.py b/setup.py
index 3929a46..bf3108d 100755
--- a/setup.py
+++ b/setup.py
@@ -132,8 +132,8 @@ def generate_parser(dest_path):
shutil.copytree("swh/search/query_language", dest_path)
print("Getting path")
- path = subprocess.check_output([yarn, "-s", "path"])
- env = {**os.environ, "PATH": path}
+ path = subprocess.check_output([yarn, "bin"]).decode().strip()
+ env = {**os.environ, "PATH": os.pathsep.join([path, os.environ["PATH"]])}
print("Generating")
subprocess.run(["tree-sitter", "generate", "--no-bindings"], cwd=dest_path, env=env)
Event Timeline
vlorentz
created this paste.
Aug 25 2021, 1:57 PM
2021-08-25 13:57:00 (UTC+2)
Log In to Comment