Bug 38299: (discussion) Move failure into same level
This patch adds the failures in at the same level as the rest of the revision output (i.e. indented under the specific database revision) and uses the standard failure coloring instead of the local update_error class. This is a proposal and may need more work to clarify and perhaps remove the duplicated/collected errors at the bottom of the update. Now that we hard stop if an update fails, I'm not sure collecting errors at the bottom makes as much sense as it once did? Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
c5d899c584
commit
5a5a0dbbce
2 changed files with 4 additions and 2 deletions
|
@ -30,6 +30,7 @@ use C4::Context;
|
|||
use Koha::Schema;
|
||||
use Koha;
|
||||
use Koha::Installer;
|
||||
use Koha::Installer::Output qw ( say_failure );
|
||||
|
||||
use vars qw(@ISA @EXPORT);
|
||||
BEGIN {
|
||||
|
@ -742,6 +743,7 @@ sub run_db_rev {
|
|||
);
|
||||
}
|
||||
catch {
|
||||
say_failure( $outfh, "ERROR: " . $_ );
|
||||
$error = $_;
|
||||
};
|
||||
|
||||
|
|
|
@ -24302,7 +24302,7 @@ unless ( $ENV{HTTP_HOST} ) { # Is that correct?
|
|||
}
|
||||
for my $e ( @{ $report->{error} } ) {
|
||||
say Encode::encode_utf8(join "\n", @{$e->{output}});
|
||||
say_failure( undef, Encode::encode_utf8("ERROR - " . $e->{error}) );
|
||||
#say_failure( undef, Encode::encode_utf8("ERROR - " . $e->{error}) );
|
||||
$error_code = 1;
|
||||
}
|
||||
|
||||
|
@ -24313,7 +24313,7 @@ unless ( $ENV{HTTP_HOST} ) { # Is that correct?
|
|||
}
|
||||
for my $e ( @{ $report->{error} } ) {
|
||||
say Encode::encode_utf8(join "\n", @{$e->{output}});
|
||||
say_failure( undef, Encode::encode_utf8("ERROR - " . $e->{error}) );
|
||||
#say_failure( undef, Encode::encode_utf8("ERROR - " . $e->{error}) );
|
||||
$error_code = 1;
|
||||
}
|
||||
exit $error_code;
|
||||
|
|
Loading…
Reference in a new issue