[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 8 16:20:59 CEST 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25634
Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #105636|0 |1
is obsolete| |
--- Comment #8 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 105648
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105648&action=edit
Bug 25634: [Alternate] 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.
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list