summaryrefslogtreecommitdiff
path: root/slackbuilder
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2019-03-21 13:17:21 +0100
committerSergey Poznyakoff <gray@gnu.org.ua>2019-03-21 13:41:16 +0100
commita003af805f0f20533159f6c8d19d72ab46176ed1 (patch)
tree3a80e4347155476cba8f63feca09a8d96a719fdb /slackbuilder
parent4014ea72424c52d945c1cadfb47f100f192f6923 (diff)
downloadslackbuilder-a003af805f0f20533159f6c8d19d72ab46176ed1.tar.gz
slackbuilder-a003af805f0f20533159f6c8d19d72ab46176ed1.tar.bz2
Improve error handling
* lib/SlackBuild/Counter.pm: New file. * t/counter.t: New file. * lib/SlackBuilder.pm: Keep counter of messages obtained on output. Use the errors method to return it. Fix the real-time parser. * slackbuilder: Improve error handling. * lib/SlackBuild/Archive/Extractor.pm (backend): Simplify the method.
Diffstat (limited to 'slackbuilder')
-rwxr-xr-xslackbuilder3
1 files changed, 3 insertions, 0 deletions
diff --git a/slackbuilder b/slackbuilder
index 5ec4fd0..41826f0 100755
--- a/slackbuilder
+++ b/slackbuilder
@@ -45,6 +45,9 @@ GetOptions("h" => sub {
abend(EX_USAGE, "bad number of arguments") unless @ARGV == 1;
my $builder = new SlackBuilder(%sbargs);
$builder->run($ARGV[0]);
+if ($builder->errors) {
+ $builder->logger->warn("there are messages in the following categories: ".join(', ', $builder->errors->categories));
+}
if ($builder->is_success) {
if ($builder->output_files == 0) {
print STDERR "Build exited successfully, but no output files were generated\n";

Return to:

Send suggestions and report system problems to the System administrator.