def install(self, path):
logger.info("Installing npm packages...")
process = subprocess.Popen(
["npm", "install"],
cwd=path,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
try:
return_code = process.wait()
except subprocess.TimeoutExpired:
return True
if return_code is not 0:
raise Exception("Return code was non-zero")
logger.info("Done.")
return True
评论列表
文章目录