https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34653
David Cook <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion --- Comment #3 from David Cook <[email protected]> --- The test for this one is a bit too simplistic, and it misses some steps. For instance, after "Apply patch", you need to either copy debian/scripts/koha-foreach to /usr/sbin/koha-foreach, or run the command from "debian/scripts/koha-foreach". As for the simplicity, I've created an alternative test: 1. koha-create --create-db test 2. vi test.sh #!/bin/sh if [ $USER = 'kohadev-koha' ]; then echo "FAILED"; exit 1; else echo "SUCCESS"; exit 0; fi root@kohadevbox:koha(bug_34653)$ debian/scripts/koha-foreach sh test.sh FAILED kohadev: 1 status returned by "sh test.sh" SUCCESS root@kohadevbox:koha(bug_34653)$ echo $? 1 -- With this patch, the exit code will be whatever the last non-zero exit code was in the koha-foreach loop. I'm not sure that's really what we want. I think it might be better if we exit with "1" if any command has a non-zero exit code. To do that, we could keep the current patch for the most part, or we could increment an error counter, or something else. Because we're running in a loop and apparently koha-foreach doesn't ditch out on non-zero exit code, I don't think we should just return the last $rv encountered. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. _______________________________________________ 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/
