https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34653
Bug ID: 34653
Summary: Make koha-foreach return the correct status code
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P5 - low
Component: Command-line Utilities
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
CC: [email protected]
Hi
Related to #33645 (and probably #25634), I notice that koha-foreach always
returns 0 (success) even if the commands it tried to run failed.
I think the correct behavior for this script should be that koha-foreach will
return success if all the commands it tried to run succeeded, but failure if
any of the commands failed.
Test plan:
0) `koha-foreach /bin/true; echo $?`
1) Note that the exit status is 0
2) `koha-foreach /bin/false; echo $?`
3) Note that the exit status is 0 (incorrect)
4) Apply patch
5) `koha-foreach /bin/true; echo $?`
6) Note that the exit status is 0
7) `koha-foreach /bin/false; echo $?`
8) Note that the exit status is 1 (correct)
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
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/