From 68c4ca7b4aebb02879e57ba4d31b93341031d493 Mon Sep 17 00:00:00 2001 From: Elijah Perrault Date: Sun, 6 Mar 2011 20:46:43 -0700 Subject: [PATCH] Fixed an issue in Git snapshots. --- bin/auto | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/auto b/bin/auto index af41781..ca1b06d 100755 --- a/bin/auto +++ b/bin/auto @@ -22,9 +22,11 @@ our $Bin = $Bin; ## no critic qw(NamingConventions::Capitalization Variables::Pr BEGIN { unshift @INC, "$Bin/../lib"; - open my $gitfh, '<', "$Bin/../.git/refs/heads/indev"; - our $VERGITREV = substr readline $gitfh, 0, 7; - close $gitfh; + if (-d "$Bin/../.git") { + open my $gitfh, '<', "$Bin/../.git/refs/heads/indev"; + our $VERGITREV = substr readline $gitfh, 0, 7; + close $gitfh; + } # Set version information. use constant { ## no critic qw(ValuesAndExpressions::ProhibitConstantPragma)