From b31e1503569d9eee9f2349ad93e260205a2e5226 Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Fri, 27 May 2016 00:21:15 +0200 Subject: SBO::Lib::git_sbo_tree: make sure chdir()s return true --- SBO-Lib/lib/SBO/Lib.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'SBO-Lib/lib/SBO/Lib.pm') diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm index 8db5b2f..f953e7d 100644 --- 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; } -- cgit v1.2.3