Skip to content

Commit 31267e8

Browse files
committed
Fix extracting submodules on windows.
1 parent fa73cf9 commit 31267e8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: src/ci/init_repo.sh

+5
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ function fetch_github_commit_archive {
4343
curl -f -sSL -o $cached $2"
4444
mkdir $module
4545
touch "$module/.git"
46+
# On Windows, the default behavior is to emulate symlinks by copying
47+
# files. However, that ends up being order-dependent while extracting,
48+
# which can cause a failure if the symlink comes first. This env var
49+
# causes tar to use real symlinks instead, which are allowed to dangle.
50+
export MSYS=winsymlinks:nativestrict
4651
tar -C $module --strip-components=1 -xf $cached
4752
rm $cached
4853
}

0 commit comments

Comments
 (0)