npm.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:bridge-test 作者: Half-Shot 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号