Fix build
This commit is contained in:
@@ -13,7 +13,7 @@ class CustomBuildHook(BuildHookInterface):
|
||||
# A hack to stop building twice on run
|
||||
if not build_data.get("force_include"):
|
||||
return
|
||||
stderr.write("🏗️ Building Cista frontend\n")
|
||||
stderr.write(">>> Building Cista frontend\n")
|
||||
npm = shutil.which("npm")
|
||||
if npm is None:
|
||||
raise RuntimeError(
|
||||
@@ -22,9 +22,9 @@ class CustomBuildHook(BuildHookInterface):
|
||||
# npm --prefix doesn't work on Windows, so we chdir instead
|
||||
os.chdir("frontend")
|
||||
try:
|
||||
stderr.write(" 》npm install\n")
|
||||
stderr.write("### npm install\n")
|
||||
subprocess.run([npm, "install"], check=True) # noqa: S603
|
||||
stderr.write("\n 》npm run build\n")
|
||||
stderr.write("\n### npm run build\n")
|
||||
subprocess.run([npm, "run", "build"], check=True) # noqa: S603
|
||||
finally:
|
||||
os.chdir("..")
|
||||
|
||||
Reference in New Issue
Block a user