Skip to content

Commit

Permalink
Fix extracting submodules on windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Feb 28, 2022
1 parent fa73cf9 commit 31267e8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ci/init_repo.sh
Expand Up @@ -43,6 +43,11 @@ function fetch_github_commit_archive {
curl -f -sSL -o $cached $2"
mkdir $module
touch "$module/.git"
# On Windows, the default behavior is to emulate symlinks by copying
# files. However, that ends up being order-dependent while extracting,
# which can cause a failure if the symlink comes first. This env var
# causes tar to use real symlinks instead, which are allowed to dangle.
export MSYS=winsymlinks:nativestrict
tar -C $module --strip-components=1 -xf $cached
rm $cached
}
Expand Down

0 comments on commit 31267e8

Please sign in to comment.