Skip to content

Commit

Permalink
Fail loudly during build when nodejs is not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
sidoh committed Jan 4, 2020
1 parent 8036087 commit 36c3197
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .build_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,19 @@ def build_web():
os.mkdir("../dist")

copyfile("build/web_assets.h", "../dist/web_assets.h")
except BaseException as e:
raise BaseException("Error building web assets: " + e)
finally:
os.chdir("..");
os.chdir("..")
else:
print("""
[ERROR] Could not build web assets.
npm is not installed. Please follow these instructions to install it:
https://nodejs.org/en/download/package-manager/
""".strip())

raise BaseException("Could not build web assets. Please install nodejs.")

build_web()

0 comments on commit 36c3197

Please sign in to comment.