Skip to content

Commit

Permalink
Support .git-files as well
Browse files Browse the repository at this point in the history
'.git' can also just be a file, not only a directory.
  • Loading branch information
okurz committed Jul 6, 2022
1 parent d46054d commit 1daea56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OpenQA/Isotovideo/Utils.pm
Expand Up @@ -16,7 +16,7 @@ our @EXPORT_OK = qw(git_rev_parse checkout_git_repo_and_branch
checkout_git_refspec handle_generated_assets load_test_schedule);

sub git_rev_parse($dirname) {
chomp(my $version = (-d "$dirname/.git" ? qx{git -C $dirname rev-parse HEAD} : '') || 'UNKNOWN');
chomp(my $version = (-e "$dirname/.git" ? qx{git -C $dirname rev-parse HEAD} : '') || 'UNKNOWN');
return $version;
}

Expand Down

0 comments on commit 1daea56

Please sign in to comment.