sbotools2

Maintenance fork of the original sbotools version 2
Log | Files | Refs | README

commit b31e1503569d9eee9f2349ad93e260205a2e5226
parent 858994d9c8c97c4cd027b270c4e623da53d49da1
Author: Andreas Guldstrand <andreas.guldstrand@gmail.com>
Date:   Fri, 27 May 2016 00:21:15 +0200

SBO::Lib::git_sbo_tree: make sure chdir()s return true

Diffstat:
MSBO-Lib/lib/SBO/Lib.pm | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm @@ -331,7 +331,7 @@ sub git_sbo_tree { my $res; if (-d "$repo_path/.git" and check_git_remote($repo_path, $url)) { _race::cond '$repo_path can be deleted after -d check'; - chdir $repo_path; + chdir $repo_path or return 0; $res = eval { die unless system(qw! git fetch !) == 0; # if system() doesn't return 0, there was an error _race::cond 'git repo could be changed or deleted here'; @@ -340,7 +340,7 @@ sub git_sbo_tree { 1; }; } else { - chdir $config{SBO_HOME}; + chdir $config{SBO_HOME} or return 0; remove_tree($repo_path) if -d $repo_path; $res = system(qw/ git clone /, $url, $repo_path) == 0; }