Summary: | koha-foreach always returns 1 if --chdir not specified | ||
---|---|---|---|
Product: | Koha | Reporter: | David Cook <dcook> |
Component: | Command-line Utilities | Assignee: | David Cook <dcook> |
Status: | RESOLVED FIXED | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | danyonsewell, lucas, robin |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
23.05.00,22.11.06,22.05.14,21.11.22
|
|
Attachments: |
Bug 33645: Make koha-foreach return 0 if it completes successfully
Bug 33645: Make koha-foreach return 0 if it completes successfully Bug 33645: Make koha-foreach return 0 if it completes successfully |
Description
David Cook
2023-05-02 00:15:45 UTC
Created attachment 150484 [details] [review] 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 Created attachment 150492 [details] [review] 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@davidnind.com> Created attachment 150566 [details] [review] 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@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Pushed to master for 23.05. Nice work everyone, thanks! Many hands makes light work, thankyou everyone! Pushed to 22.11.x for the next release Backported to 22.05.x for upcoming 22.05.14 Backported to 21.11.x for upcoming 21.11.22. |