[Koha-bugs] [Bug 33645] koha-foreach always returns 1 if --chdir not specified

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed May 3 09:34:40 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33645

Jonathan Druart <jonathan.druart+koha at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #150492|0                           |1
        is obsolete|                            |

--- Comment #3 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
Created attachment 150566
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150566&action=edit
Bug 33645: Make koha-foreach return 0 if it completes successfully

This patch adds an "exit 0" to the end of koha-foreach, so that it
returns a successful exit code if it reaches the bottom of the script
without errors.

Test plan:
0) `koha-foreach echo`
1) `echo $?`
2) Note that the exit status is 1
3) Apply patch
4) `./debian/scripts/koha-foreach echo`
5) `echo $?`
6) Note that the exit status is 0

Signed-off-by: David Nind <david at davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list