1
0
mirror of https://gitee.com/coder-xiaomo/gitee2github synced 2025-01-10 11:48:14 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

修复bat所在路径带空格执行报错情况

This commit is contained in:
程序员小墨 2022-03-17 15:48:25 +08:00
parent 8d92614cfa
commit cb22ccf908

View File

@ -71,7 +71,7 @@ def transferRepos(matchList, WorkingDir, fromRepoProtocol = 'https', toRepoProto
print("命令文件生成完毕,请查看:", batFilePath)
if input("是否直接执行(不推荐)输入y执行其他输入不执行并继续: ") == "y":
os.system(batFilePath)
os.system('"{}"'.format(batFilePath))
# 下面这样执行不行,无法保证当前目录
# for commandForExecute in commands:
# print("[正在执行]", commandForExecute)