Skip to content

Commit ba9a253

Browse files
committed
[ci]: add error handling to git log call
1 parent ddfcf9a commit ba9a253

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tools/msvc/Solution.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,8 @@ EOF
509509
# Generate commit_id file
510510
# If there is .git rewrite file whenever gitlog succeeds
511511
if ( -d ".git" ) {
512-
open P,"git log -1 --format='%h' |";
512+
my $cmd = "git log -1 --format='%h'";
513+
open P,"$cmd |" || confess "Could not open: $cmd\n";;
513514
my $commit_id = <P>;
514515
chomp($commit_id);
515516
if (close(P)) {

0 commit comments

Comments
 (0)