Skip to content

Commit

Permalink
Better error message in multi git repo fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Dec 19, 2023
1 parent ac92b78 commit fa5a803
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utils/GitTagFetcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit fa5a803

Please sign in to comment.