mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
build: fail a build if some hooks don't succeed (#16369)
This commit is contained in:
18
script/lib/npm.py
Normal file
18
script/lib/npm.py
Normal 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:])
|
||||
Reference in New Issue
Block a user