run_actions propagate docs error (#163)

* run_actions propagate docs error
This commit is contained in:
Matthew Tancik authored and GitHub committed 2022-07-16 16:23:36 -07:00
1 parent ab35e28871
commit 33eff4d0fc
1 file changed
+8 -4
+8 -4
View File
@@ -7,11 +7,15 @@ import yaml
LOCAL_TESTS = ["Run license checks", "Run Black", "Python Pylint", "Test with pytest"]
def run_command(command):
"""Run a command kill actions if it fails"""
def run_command(command) -> None:
"""Run a command kill actions if it fails
Args:
command (str): command to run
"""
ret_code = subprocess.call(command, shell=True)
if ret_code != 0:
print(f"\033[31mError: `{curr_command}` failed. Exiting...\033[0m")
print(f"\033[31mError: `{command}` failed. Exiting...\033[0m")
sys.exit(1)
@@ -37,7 +41,7 @@ if __name__ == "__main__":
# Add checks for building documentation
print_green("Building Documentation")
run_command("cd docs/; make html; cd ../")
run_command("cd docs/; make html SPHINXOPTS='-W;'")
print("\n")
print_green("=" * 100)