diff --git a/deployer/config.php b/deployer/config.php index 8d0e186..26070f2 100644 --- a/deployer/config.php +++ b/deployer/config.php @@ -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())) {