Skip to content

Commit

Permalink
Merge pull request #474 from range-of-motion/ignore-command-for-updat…
Browse files Browse the repository at this point in the history
…ing-version-file-from-code-coverage

Ignore command for updating version file from code coverage
  • Loading branch information
range-of-motion authored Dec 26, 2023
2 parents 0229d72 + fc10c1c commit 45582d6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/Console/Commands/UpdateVersionFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ class UpdateVersionFile extends Command

protected $description = 'Updates the version in version.txt';

/**
* Ignoring this command from code coverage as it is dependent on whether Git is
* installed or not, which can vary from machine to machine.
*
* @codeCoverageIgnore
*/
public function handle(): int
{
if (trim(shell_exec('git rev-parse --is-inside-work-tree')) !== 'true') {
Expand Down

0 comments on commit 45582d6

Please sign in to comment.