aboutsummaryrefslogtreecommitdiff
path: root/SBO-Lib/lib
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2017-05-18 16:08:26 +0200
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2017-05-18 16:08:26 +0200
commit15ebf5ad1fd33d451409e9f51d10d32df4a22087 (patch)
treec61784e73ef7670837086ce0e61dcc294f9cb735 /SBO-Lib/lib
parent9fbebe484aea34de5abc9d06daa8fd3f64c2cb26 (diff)
downloadsbotools2-15ebf5ad1fd33d451409e9f51d10d32df4a22087.tar.xz
SBO::Lib::Repo: exit with error when repo synch fails.
This fixes #61.
Diffstat (limited to 'SBO-Lib/lib')
-rw-r--r--SBO-Lib/lib/SBO/Lib/Repo.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/SBO-Lib/lib/SBO/Lib/Repo.pm b/SBO-Lib/lib/SBO/Lib/Repo.pm
index fb4ffda..34da7c9 100644
--- a/SBO-Lib/lib/SBO/Lib/Repo.pm
+++ b/SBO-Lib/lib/SBO/Lib/Repo.pm
@@ -6,7 +6,7 @@ use warnings;
our $VERSION = '2.4';
-use SBO::Lib::Util qw/ %config prompt usage_error get_slack_version script_error open_fh open_read in /;
+use SBO::Lib::Util qw/ %config prompt usage_error get_slack_version script_error open_fh open_read in _ERR_DOWNLOAD /;
use Cwd;
use File::Copy;
@@ -300,6 +300,8 @@ sub pull_sbo_tree {
$res = git_sbo_tree($url);
}
+ if ($res == 0) { warn "Could not sync from $url.\n"; exit _ERR_DOWNLOAD; }
+
my $wanted = sub { chown 0, 0, $File::Find::name; };
find($wanted, $repo_path) if -d $repo_path;
if ($res and not chk_slackbuilds_txt()) {