[Bug 33645] New: koha-foreach always returns 1 if --chdir not specified
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33645 Bug ID: 33645 Summary: koha-foreach always returns 1 if --chdir not specified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz If you don't provide --chdir to koha-foreach it will always return an exit code of 1, because the final if statement in the script will return false -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33645 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |dcook@prosentient.com.au |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33645 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33645 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Created attachment 150484 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150484&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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33645 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33645 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #150484|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 150492 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150492&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@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33645 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33645 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #150492|0 |1 is obsolete| | --- Comment #3 from Jonathan Druart <jonathan.druart+koha@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@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33645 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33645 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.05. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33645 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|23.05.00 |23.05.00,22.11.06 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33645 --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Many hands makes light work, thankyou everyone! Pushed to 22.11.x for the next release -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33645 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.05.00,22.11.06 |23.05.00,22.11.06,22.05.14 released in| | Status|Pushed to stable |Pushed to oldstable CC| |lucas@bywatersolutions.com --- Comment #6 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 22.05.x for upcoming 22.05.14 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33645 Danyon Sewell <danyonsewell@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |danyonsewell@catalyst.net.n | |z Version(s)|23.05.00,22.11.06,22.05.14 |23.05.00,22.11.06,22.05.14, released in| |21.11.22 Status|Pushed to oldstable |Pushed to oldoldstable --- Comment #7 from Danyon Sewell <danyonsewell@catalyst.net.nz> --- Backported to 21.11.x for upcoming 21.11.22. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org