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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
David Cook 2023-05-02 00:16:30 +00:00 committed by Tomas Cohen Arazi
parent 9ccc5ccce0
commit e8a187eb74
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 2 additions and 0 deletions

View File

@ -72,3 +72,5 @@ do
[ "$chdir" != "no" ] && cd "$starting_dir"
fi
done
exit 0