[koha-commits] main Koha release repository branch 19.11.x updated. v19.11.04-35-g5d22e0b3a3

Git repo owner gitmaster at git.koha-community.org
Wed Apr 1 23:46:07 CEST 2020


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "main Koha release repository".

The branch, 19.11.x has been updated
       via  5d22e0b3a331e35b8f1e494bc366c1624c982cf8 (commit)
      from  8386f5f5e828565457ea4421773b0d0fe5168483 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5d22e0b3a331e35b8f1e494bc366c1624c982cf8
Author: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Date:   Thu Feb 13 12:03:36 2020 +0100

    Bug 17532: Make koha-shell propagate the error code
    
    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
    
    Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
    Tested it with
      $ sudo debian/scripts/koha-shell kohadev -c 'exit 8'
      $ echo $?
      8
    The unpatched version returns 0 (forgets about the error code).
    
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>
    
    Signed-off-by: Joy Nelson <joy at bywatersolutions.com>

-----------------------------------------------------------------------

Summary of changes:
 debian/scripts/koha-shell | 2 ++
 1 file changed, 2 insertions(+)


hooks/post-receive
-- 
main Koha release repository


More information about the koha-commits mailing list