Skip to content

Commit

Permalink
CommunitySuite: set longpaths in clone directory
Browse files Browse the repository at this point in the history
This avoids race conditions when global config is locked by another.
  • Loading branch information
kitbellew committed Oct 1, 2024
1 parent 1e89fb7 commit a7c3c68
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,14 @@ abstract class CommunitySuite extends FunSuite {
val folderPath = communityProjectsDirectory.resolve(build.name)
val folder = folderPath.toString

if (OsSpecific.isWindows)
if (0 != runCmdRaw("git config --global core.longpaths true"))
runCmd("git config --system core.longpaths true", "setting long paths")

if (!Files.exists(folderPath)) runCmd(
s"git clone --depth=1 --no-single-branch ${build.giturl} $folder",
"cloning",
)

if (OsSpecific.isWindows)
runCmd(s"git -C $folder config core.longpaths true", "setting long paths")

val ref = build.commit

runCmd(s"git -C $folder fetch --depth=1 origin $ref", s"fetching [ref=$ref]")
Expand Down

0 comments on commit a7c3c68

Please sign in to comment.