| | |
| | | if os.path.exists(output_file_path): |
| | | os.remove(output_file_path) |
| | | # 进行编译 |
| | | logger_debug.info(f"编译脚本:{os.path.join(root_dir, script)}") |
| | | result = subprocess.run(f"cd {root_dir} && {script} ", stdout=subprocess.PIPE, shell=True) |
| | | fscript = f"cd {root_dir} && rm -rf {output_file} && {script} " |
| | | logger_debug.info(fscript) |
| | | result = subprocess.run(fscript, stdout=subprocess.PIPE, shell=True) |
| | | logger_debug.info(f"执行结果:{result.stdout}") |
| | | if not os.path.exists(output_file_path): |
| | | response_data = json.dumps({"code": 1, "msg": "编译失败"}) |