From cae5f03fc140680eae4ec97f33fa80fff8eccfc7 Mon Sep 17 00:00:00 2001 From: Gregor Harlan Date: Thu, 23 May 2024 15:12:42 +0200 Subject: [PATCH] git-cli nicht auf Remote-Server suchen (#90) --- deployer/config.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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())) {