Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

FCM::Util: version: should not require git

  • Loading branch information...
commit 8bc562cd9c66e8dfe4f5ef7f6bf4d8e8b2cc4937 1 parent e5f7736
@matthewrmshin matthewrmshin authored
Showing with 12 additions and 4 deletions.
  1. +12 −4 lib/FCM/Util.pm
View
16 lib/FCM/Util.pm
@@ -469,10 +469,18 @@ sub _util_of_func {
sub _version {
my ($attrib_ref) = @_;
# Try "git describe"
- my $value_hash_ref = $ACTION_OF{shell_simple}->(
- $attrib_ref,
- ['git', "--git-dir=$FindBin::Bin/../.git", 'describe'],
- );
+ my $value_hash_ref = eval {
+ $ACTION_OF{shell_simple}->(
+ $attrib_ref,
+ ['git', "--git-dir=$FindBin::Bin/../.git", 'describe'],
+ );
+ };
+ if (my $e = $@) {
+ if (!$E->caught($e)) {
+ die($e);
+ }
+ $@ = undef;
+ }
if ($value_hash_ref->{o} && !$value_hash_ref->{rc}) {
chomp($value_hash_ref->{o});
return "FCM " . $value_hash_ref->{o};
Please sign in to comment.
Something went wrong with that request. Please try again.