[koha-commits] main Koha release repository branch 19.05.x updated. v19.05.09-22-gc779db2d75

Git repo owner gitmaster at git.koha-community.org
Thu Apr 9 22:03:45 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.05.x has been updated
       via  c779db2d75d2808b8a4b36f53bf467ec8dd5a33d (commit)
      from  97df645697f238f503d6afe1105d203eacd6fc51 (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 c779db2d75d2808b8a4b36f53bf467ec8dd5a33d
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>
    (cherry picked from commit 5d22e0b3a331e35b8f1e494bc366c1624c982cf8)
    
    Signed-off-by: Lucas Gass <lucas 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