aboutsummaryrefslogtreecommitdiff
path: root/SBO-Lib/lib/SBO/Lib.pm
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2016-04-19 01:48:16 +0200
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2016-04-19 01:48:16 +0200
commitf939d14e0c16243d887bdc864d562785550d1259 (patch)
treed901343e1b60f2869d22bf65d0c4fcfbadd842f9 /SBO-Lib/lib/SBO/Lib.pm
parent5142975a73ccf3a764596e0ef9ff32c4b06fd2da (diff)
downloadsbotools2-f939d14e0c16243d887bdc864d562785550d1259.tar.xz
Check that .git/config file exists before attempting to open it
Diffstat (limited to 'SBO-Lib/lib/SBO/Lib.pm')
-rw-r--r--SBO-Lib/lib/SBO/Lib.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm
index 0a4508c..50cb96b 100644
--- a/SBO-Lib/lib/SBO/Lib.pm
+++ b/SBO-Lib/lib/SBO/Lib.pm
@@ -342,6 +342,7 @@ sub git_sbo_tree {
sub check_git_remote {
script_error('check_git_remote requires two arguments.') unless @_ == 2;
my ($path, $url) = @_;
+ return 0 unless -f "$path/.git/config";
my ($fh, $exit) = open_read("$path/.git/config");
return 0 if $exit;