Fix build
This commit is contained in:
parent
85693e99d0
commit
226ac67d26
|
@ -1,4 +1,5 @@
|
||||||
# noqa: INP001
|
# noqa: INP001
|
||||||
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
@ -17,6 +18,10 @@ class CustomBuildHook(BuildHookInterface):
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
"NodeJS `npm` is required for building Cista but it was not found"
|
"NodeJS `npm` is required for building Cista but it was not found"
|
||||||
)
|
)
|
||||||
frontend = "frontend"
|
# npm --prefix doesn't work on Windows, so we chdir instead
|
||||||
subprocess.run([npm, "install", "--prefix", frontend], check=True) # noqa: S603
|
os.chdir("frontend")
|
||||||
subprocess.run([npm, "run", "build", "--prefix", frontend], check=True) # noqa: S603
|
try:
|
||||||
|
subprocess.run([npm, "install"], check=True) # noqa: S603
|
||||||
|
subprocess.run([npm, "run", "build"], check=True) # noqa: S603
|
||||||
|
finally:
|
||||||
|
os.chdir("..")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user