Bugzilla – Attachment 155160 Details for
Bug 34653
Make koha-foreach return the correct status code
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix te exit code for koha-foreach
0001-Bug-34653-Make-koha-foreach-return-the-correct-statu.patch (text/plain), 1.21 KB, created by
Evan Giles
on 2023-09-02 03:34:31 UTC
(
hide
)
Description:
Fix te exit code for koha-foreach
Filename:
MIME Type:
Creator:
Evan Giles
Created:
2023-09-02 03:34:31 UTC
Size:
1.21 KB
patch
obsolete
>From c9f2f3f5b3497f06f8f40256b40489cfd699f0b5 Mon Sep 17 00:00:00 2001 >From: Evan Giles <evan@catalyst.net.nz> >Date: Fri, 1 Sep 2023 18:42:45 +1200 >Subject: [PATCH] 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 success if all the commands it tried to run succeeded, but >failure if any of the commands failed. > >To test: >0) `koha-foreach /bin/true; echo $?` >1) Note that the exit status is 0 >2) `koha-foreach /bin/false; echo $?` >3) Note that the exit status is 0 (incorrect) > >4) Apply patch > >5) `koha-foreach /bin/true; echo $?` >6) Note that the exit status is 0 >7) `koha-foreach /bin/false; echo $?` >8) Note that the exit status is 1 (correct) >--- > debian/scripts/koha-foreach | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/debian/scripts/koha-foreach b/debian/scripts/koha-foreach >index d2e98dd7de..8672a63446 100755 >--- a/debian/scripts/koha-foreach >+++ b/debian/scripts/koha-foreach >@@ -51,6 +51,7 @@ do > shift > done > >+rv=0 > for name in $(koha-list $listopts) > do > # Replace the __instancename__ placeholder for the instance name (Bug 8566) >@@ -73,4 +74,4 @@ do > fi > done > >-exit 0 >+exit $rv >-- >2.34.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34653
:
155160
|
155248
|
155770
|
155777
|
156042