Skip to content

Commit 906d771

Browse files
committed
Handle detached HEAD
1 parent 7458bc0 commit 906d771

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/Phug/Split/Command/Dist.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ protected function distribute(Split $cli): bool
124124

125125
$branch = $branch[1];
126126

127+
if (substr($branch, 0, 18) === '(HEAD detached at ') {
128+
$branch = trim(explode("\n", $this->git('describe --contains --all HEAD'))[0]);
129+
}
130+
127131
foreach ($this->getPackages() as $package) {
128132
$this->distributePackage($cli, $package, $branch);
129133
}

0 commit comments

Comments
 (0)