Skip to content
This repository was archived by the owner on Jan 31, 2023. It is now read-only.

Commit 4936f1d

Browse files
committed
This works only if dealing with a git checkout
1 parent 7d56095 commit 4936f1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/php/libsdk/SDK/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public static function guessCurrentBranchName() : ?string
221221
if (!$git && is_executable('c:\apps\git\bin\git.exe')) {
222222
$git = 'c:\apps\git\bin\git.exe';
223223
}
224-
if ($git) {
224+
if ($git && is_dir(".git")) {
225225
$cmd = "\"$git\" branch";
226226

227227
$ret = trim(shell_exec($cmd));

0 commit comments

Comments
 (0)