https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34653
--- Comment #9 from Evan Giles <[email protected]> --- Created attachment 155770 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155770&action=edit Bug 34653: Make koha-foreach return the correct status code I think the correct behavior for this script should be that koha-foreach will return 0 (success) if all the commands it tried to run succeeded, but 1 (failure) if any of the commands failed. To test: 1. $ koha-create --create-db test 2. $ vi test.sh if [ $USER = 'kohadev-koha' ]; then echo "FAILED"; exit 1; else echo "SUCCESS"; exit 0; fi 3. $ debian/scripts/koha-foreach sh test.sh FAILED kohadev: 1 status returned by "sh test.sh" SUCCESS 4. $ echo $? 5. Note that the exit status is 0 (success) 6. Apply patch 7. $ debian/scripts/koha-foreach sh test.sh FAILED kohadev: 1 status returned by "sh test.sh" SUCCESS 8. $ echo $? 9. Note that the exit status is 1 (failure) -- You are receiving this mail because: 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/
