Alpine 软件包的文档说明了预安装脚本的以下内容:
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.
但是,当预安装脚本返回1
apk时,我的情况并非如此做打印错误pre-install: script exited with error 1
,并继续安装软件包并运行所有其他安装脚本(安装后),就好像什么也没发生一样。
如果预安装失败,我有什么方法可以真正中止安装吗?
经过进一步调查,我在安装官方软件包时看到了这一点:
(1/1) Installing dnsmasq (2.80-r3)
Executing dnsmasq-2.80-r3.pre-install
Executing busybox-1.30.1-r3.trigger
所以前-install 实际执行后安装(☉_☉)