From 0e8895640906e58cade36d681d371061b2c74967 Mon Sep 17 00:00:00 2001 From: legatvs Date: Mon, 15 Jun 2009 14:11:21 +0300 Subject: [PATCH] Fix: return code is always 0. --- CHANGES | 6 ++++++ lib/clive/App.pm | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 5f28190..6caae98 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +Version 2.2.1 + + User-visible changes: + * Fix: return code is always 0 (closes issue #20) + + Version 2.2.0 (June 14, 2009) diff --git a/lib/clive/App.pm b/lib/clive/App.pm index ae2100a..cbe0067 100644 --- a/lib/clive/App.pm +++ b/lib/clive/App.pm @@ -46,6 +46,8 @@ sub main { clive::Exec->instance->init; _parseInput(); + + exit(clive::Log->instance->errorOccurred); } sub _parseInput { @@ -207,7 +209,7 @@ sub _parseLine { if ( $ln =~ /last\.fm/ ) { $ln =~ /\+1\-(.+)/; if ( !$1 ) { - print( STDERR "no support: $ln\n" ); + clive::Log->instance->errn("no support: $ln"); return; } $ln = "http://youtube.com/watch?v=$1"; -- 2.11.4.GIT