Skip to content

Commit 6971fb2

Browse files
committed
explaining the workaround in comments
1 parent 1ad1722 commit 6971fb2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/gha/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,11 @@ def verify_vcpkg_build(vcpkg_triplet, attempt_auto_fix=False):
193193
# Manually renaming and re-running script makes it go through.
194194
tools_dir_path = os.path.join(vcpkg_root_dir_path, 'downloads', 'tools')
195195
for name in os.listdir(tools_dir_path):
196+
# In the specific windows error that we noticed, the error occurs while
197+
# trying to rename intermediate directories for donwloaded tools
198+
# like "powershell.partial.<pid>" to "powershell". Renaming via python
199+
# also runs into the same error. Workaround is to copy instead of rename.
196200
if '.partial.' in name and os.path.isdir(os.path.join(tools_dir_path, name)):
197-
# Since we can't rename, lets copy the directory to one without partial in the name
198201
expected_name = name.split('.partial.')[0]
199202
shutil.copytree(os.path.join(tools_dir_path, name),
200203
os.path.join(tools_dir_path, expected_name))

0 commit comments

Comments
 (0)