refactor: use shell=True on subproccess call only on nt systems

should fix linux usage
This commit is contained in:
Kentai Radiquum 2025-06-21 00:02:09 +05:00
parent 8baab91e60
commit 43d09314ff
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
4 changed files with 13 additions and 5 deletions

View file

@ -1,3 +1,5 @@
#!/usr/bin/env python3
import subprocess
import os
import shutil
@ -56,7 +58,7 @@ if __name__ == "__main__":
# TODO?: install node deps automatically
if not args.no_rebuild:
build = subprocess.call(["bun", "run", "build"], cwd="./gui", shell=True)
build = subprocess.call(["bun", "run", "build"], cwd="./gui", shell=(os.name == "nt"))
if build != 0:
print("[ERROR] Next.js gui has failed to build")
raise
@ -110,7 +112,7 @@ if __name__ == "__main__":
"templates:templates",
],
cwd="./dist",
shell=True,
shell=(os.name == "nt"),
)
if build != 0:
print("[ERROR] pyinstaller has failed to build an app")
@ -140,7 +142,7 @@ if __name__ == "__main__":
"mc_version.json:.",
],
cwd="./dist",
shell=True,
shell=(os.name == "nt"),
)
if build != 0:
print("[ERROR] pyinstaller has failed to build an app")