From 293767ecc28ffb5de935531154687a732a353694 Mon Sep 17 00:00:00 2001 From: Gregor Harlan Date: Thu, 23 May 2024 14:16:45 +0200 Subject: [PATCH] git-cli nicht auf Remote-Server suchen --- 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())) {