Skip to content

Commit

Permalink
git-cli nicht auf Remote-Server suchen (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
gharlan authored May 23, 2024
1 parent 2e9fbcf commit cae5f03
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion deployer/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,14 @@ public function get(string $name): Host\Host
host('local');
}

set('branch', static fn () => runLocally('{{bin/git}} rev-parse --abbrev-ref HEAD'));
set('branch', static function () {
$branch = null;
on(host('local'), static function () use (&$branch) {
$branch = run('{{bin/git}} rev-parse --abbrev-ref HEAD');
});

return $branch;
});

$baseDir = $rootPath;
if (str_starts_with($baseDir, getcwd())) {
Expand Down

0 comments on commit cae5f03

Please sign in to comment.