diff options
| author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-05-27 00:21:15 +0200 | 
|---|---|---|
| committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-05-27 00:21:15 +0200 | 
| commit | b31e1503569d9eee9f2349ad93e260205a2e5226 (patch) | |
| tree | 73abde67ef9a0d160e862bb0f8de32184ec802fe /SBO-Lib/lib/SBO/Lib.pm | |
| parent | 858994d9c8c97c4cd027b270c4e623da53d49da1 (diff) | |
| download | sbotools2-b31e1503569d9eee9f2349ad93e260205a2e5226.tar.xz | |
SBO::Lib::git_sbo_tree: make sure chdir()s return true
Diffstat (limited to 'SBO-Lib/lib/SBO/Lib.pm')
| -rw-r--r-- | SBO-Lib/lib/SBO/Lib.pm | 4 | 
1 files changed, 2 insertions, 2 deletions
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;  	}  | 
