mirror of
https://github.com/Radiquum/YAMPD.git
synced 2025-09-05 05:55:40 +05:00
refactor: use shell=True on subproccess call only on nt systems
should fix linux usage
This commit is contained in:
parent
8baab91e60
commit
43d09314ff
4 changed files with 13 additions and 5 deletions
8
build.py
8
build.py
|
@ -1,3 +1,5 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
|
@ -56,7 +58,7 @@ if __name__ == "__main__":
|
||||||
# TODO?: install node deps automatically
|
# TODO?: install node deps automatically
|
||||||
|
|
||||||
if not args.no_rebuild:
|
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:
|
if build != 0:
|
||||||
print("[ERROR] Next.js gui has failed to build")
|
print("[ERROR] Next.js gui has failed to build")
|
||||||
raise
|
raise
|
||||||
|
@ -110,7 +112,7 @@ if __name__ == "__main__":
|
||||||
"templates:templates",
|
"templates:templates",
|
||||||
],
|
],
|
||||||
cwd="./dist",
|
cwd="./dist",
|
||||||
shell=True,
|
shell=(os.name == "nt"),
|
||||||
)
|
)
|
||||||
if build != 0:
|
if build != 0:
|
||||||
print("[ERROR] pyinstaller has failed to build an app")
|
print("[ERROR] pyinstaller has failed to build an app")
|
||||||
|
@ -140,7 +142,7 @@ if __name__ == "__main__":
|
||||||
"mc_version.json:.",
|
"mc_version.json:.",
|
||||||
],
|
],
|
||||||
cwd="./dist",
|
cwd="./dist",
|
||||||
shell=True,
|
shell=(os.name == "nt"),
|
||||||
)
|
)
|
||||||
if build != 0:
|
if build != 0:
|
||||||
print("[ERROR] pyinstaller has failed to build an app")
|
print("[ERROR] pyinstaller has failed to build an app")
|
||||||
|
|
6
dev.py
6
dev.py
|
@ -1,3 +1,5 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import time
|
import time
|
||||||
import os
|
import os
|
||||||
|
@ -13,10 +15,10 @@ if __name__ == "__main__":
|
||||||
# TODO?: install node deps automatically
|
# TODO?: install node deps automatically
|
||||||
|
|
||||||
gui_proc = subprocess.Popen(
|
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(
|
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:
|
try:
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from sys import exit
|
from sys import exit
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
from flask import Flask
|
from flask import Flask
|
||||||
from flask import render_template, send_file, abort
|
from flask import render_template, send_file, abort
|
||||||
from flaskwebgui import FlaskUI # import FlaskUI
|
from flaskwebgui import FlaskUI # import FlaskUI
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue