fix: --cone

This commit is contained in:
Andras Bacsai
2024-12-11 15:12:44 +01:00
parent 70586ba213
commit 1908d8a180

View File

@@ -1331,8 +1331,10 @@ class Application extends BaseModel
$currentPath = ''; $currentPath = '';
foreach ($parts as $part) { foreach ($parts as $part) {
$currentPath .= ($currentPath ? '/' : '').$part; $currentPath .= ($currentPath ? '/' : '').$part;
if (str($currentPath)->isNotEmpty()) {
$paths->push($currentPath); $paths->push($currentPath);
} }
}
return $paths; return $paths;
})->flatten()->unique()->values(); })->flatten()->unique()->values();
@@ -1341,7 +1343,7 @@ class Application extends BaseModel
"mkdir -p /tmp/{$uuid}", "mkdir -p /tmp/{$uuid}",
"cd /tmp/{$uuid}", "cd /tmp/{$uuid}",
$cloneCommand, $cloneCommand,
'git sparse-checkout init --cone', 'git sparse-checkout init',
"git sparse-checkout set {$fileList->implode(' ')}", "git sparse-checkout set {$fileList->implode(' ')}",
'git read-tree -mu HEAD', 'git read-tree -mu HEAD',
"cat .$workdir$composeFile", "cat .$workdir$composeFile",