diff --git a/build.py b/build.py index c49ada6..2a02c1c 100644 --- a/build.py +++ b/build.py @@ -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") diff --git a/dev.py b/dev.py index 6289f5b..38f4352 100644 --- a/dev.py +++ b/dev.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import subprocess import time import os @@ -13,10 +15,10 @@ if __name__ == "__main__": # TODO?: install node deps automatically gui_proc = subprocess.Popen( - ["bun", "run", "dev"], cwd="./gui", env=environment, shell=True + ["bun", "run", "dev"], cwd="./gui", env=environment, shell=(os.name == "nt") ) app_proc = subprocess.Popen( - ["python", "main.py"], cwd="./src", env=environment, shell=True + ["python", "main.py"], cwd="./src", env=environment, shell=(os.name == "nt") ) try: diff --git a/src/cli.py b/src/cli.py index 31b1e71..f3c0884 100644 --- a/src/cli.py +++ b/src/cli.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import os from sys import exit diff --git a/src/main.py b/src/main.py index 80b59c8..2a76764 100644 --- a/src/main.py +++ b/src/main.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + from flask import Flask from flask import render_template, send_file, abort from flaskwebgui import FlaskUI # import FlaskUI