diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-04-19 01:48:16 +0200 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-04-19 01:48:16 +0200 |
commit | f939d14e0c16243d887bdc864d562785550d1259 (patch) | |
tree | d901343e1b60f2869d22bf65d0c4fcfbadd842f9 /SBO-Lib/lib/SBO/Lib.pm | |
parent | 5142975a73ccf3a764596e0ef9ff32c4b06fd2da (diff) | |
download | sbotools2-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.pm | 1 |
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; |