https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17532

Jonathan Druart <jonathan.dru...@bugs.koha-community.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |Needs Signoff

--- Comment #4 from Jonathan Druart <jonathan.dru...@bugs.koha-community.org> 
---
Context: I am trying to make koha-misc4dev stop when something wrong happens.
Basically we do not want the process to continue of the DB has not been
populated correctly.
It will make the errors easier to catch.

The issue: Say a script that will return an error (die in perl for an easy
example), koha-shell will not return the 255 error code, but 0 instead. The
caller cannot know something wrong happened

The solution is to propagate the error and make koha-shell return the same
error code as the command it executed

An example:
=== t.pl ===
die('something wrong');

% perl t.pl;echo $?
something wrong at t.pl line 1.
255

% sudo koha-shell kohadev -p -c 'perl xxx.pl' ; echo $?
something wrong at xxx.pl line 1.
0

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to