The documentation for the Alpine package says the following of the pre-install script:
Note the exit 0 at the end. If the script exits with failure (if the user already exist), the package will not be installed and apk add will exit with failure.
However, this isn't the case for me, when the pre-install script returns
1 apk does print the error
pre-install: script exited with error 1, and also continues to install the package as well as run all the other install scripts (post-install) as if nothing happened.
Is there any way for me to actually abort the installation should the pre-install fail?
Upon further investigation I saw this while installing an official package:
(1/1) Installing dnsmasq (2.80-r3) Executing dnsmasq-2.80-r3.pre-install Executing busybox-1.30.1-r3.trigger
So the pre-install actually executes after the install (☉_☉)