fix: `return 0` instead of `return` if the intent is not to exit build

If the previous if statement checking if PASSES_TO_LAYERS is true,
then the last return code be non-zero and a return statement with no
argument will return the error code of the if statement thus exiting
the script. This is  not our intent. So we need to return 0 here when
layer name as already been registered
ubuntu-core-desktop-noble
Philip Roche 11 months ago
parent e1ab57301f
commit 200bde50cc

7
debian/changelog vendored

@ -1,3 +1,10 @@
livecd-rootfs (24.04.21) noble; urgency=medium
* Do not exit live image build if PASSES_TO_LAYERS is true and layer
is already registered.
-- Philip Roche <phil.roche@canonical.com> Wed, 24 Jan 2024 17:59:06 +0000
livecd-rootfs (24.04.20) noble; urgency=medium
* fix: Fix for calling unminimize if lxd-installer package

@ -109,7 +109,13 @@ _register_pass () {
case "$PASSES" in
*$1*)
return
# The pass is already registered in the list of layers.
# If PASSES_TO_LAYERS is true, then the above if statement's error
# code will be non-zero and a return statement with no argument
# will return the error code of the if statement, non-zero, thus
# exiting the script and build. This is not our intent. So we need
# to return 0 here.
return 0
;;
esac

Loading…
Cancel
Save