Commit 16baba52 authored by jinkaiqiang's avatar jinkaiqiang

linux上使用命令删除试试

parent 8ff77da0
Pipeline #28944 passed with stage
in 21 seconds
import os
import platform
import shutil
import stat
import time
......@@ -38,7 +39,11 @@ def readonly_handler(func, path, execinfo):
time.sleep(0.5)
func(path)
if os.path.exists(git_path):
if platform.system() == 'Linux':
os.system(f"rm -rf {deploy_repo_path}")
else:
shutil.rmtree(git_path, onerror=readonly_handler)
# docker环境线下老是出现问题,先用代码拉取
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment