dont chdir, but construct the path

This commit is contained in:
2023-03-28 09:15:10 +02:00
parent f8d1df44d1
commit b401286d05

View File

@ -36,12 +36,11 @@ cherrypy_params = f"""
import sys import sys
import os
# cd to the folder that contains this script # combine the folder that contains this script
base = sys.path[0] base = sys.path[0] or "."
os.chdir(base) script = f"{base}/stand/webapp.py"
import subprocess import subprocess
@ -52,7 +51,7 @@ import subprocess
cmd = [ cmd = [
# "echo", # "echo",
"streamlit", "run", *streamlit_params, "stand/webapp.py", "streamlit", "run", *streamlit_params, script,
"--", *cherrypy_params "--", *cherrypy_params
] ]