build: fail a build if some hooks don't succeed (#16369)

This commit is contained in:
Alexey Kuzmin 2019-01-23 11:31:14 +01:00 committed by GitHub
parent fd8b9450ee
commit 0a5adfe365
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 4 deletions

18
script/lib/npm.py Normal file
View file

@ -0,0 +1,18 @@
import subprocess
import sys
def npm(*npm_args):
call_args = [__get_executable_name()] + list(npm_args)
subprocess.check_call(call_args)
def __get_executable_name():
executable = 'npm'
if sys.platform == 'win32':
executable += '.cmd'
return executable
if __name__ == '__main__':
npm(*sys.argv[1:])