[Koha-bugs] [Bug 25634] koha-foreach exits too early if any command has non-zero status
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Jun 1 07:55:56 CEST 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25634
--- Comment #2 from David Cook <dcook at prosentient.com.au> ---
Created attachment 105453
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105453&action=edit
Bug 25634: Warn if koha-shell returns non-zero in koha-foreach
By putting koha-shell in an if statement, "set -e" will no longer
cause the entire koha-foreach program to exit, if koha-shell
returns a non-zero status.
If a non-zero status is returned, we warn on it, and the caller
of koha-foreach can interpret that command visually.
To Test:
1) Write a shell script that says "Hello" and then exits with a 1
status
2) Run koha-foreach against that shell script with multiple instances
available to koha-foreach
3) Before the patch, koha-foreach will die after the first "Hello"
4) After the patch, koha-foreach will continue, through all the
instances, and report which instances returned non-zero statuses
by which command.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list