diff --git a/src/utils/GitTagFetcher.php b/src/utils/GitTagFetcher.php index e4a36da..5596d43 100644 --- a/src/utils/GitTagFetcher.php +++ b/src/utils/GitTagFetcher.php @@ -18,6 +18,9 @@ public function fetchLatestTagVersion(?string $workingDirectory): string exec($cmd, $output, $returnCode); if ($returnCode !== 0 || count($output) !== 1) { + if ($workingDirectory !== null) { + throw new \RuntimeException('Could not determine latest git tag in working directory: "' . $workingDirectory .'"'); + } throw new \RuntimeException('Could not determine latest git tag'); } return $output[0];