abuild-keygen fails without aborting if run as a non-root user and sudo isn't installed
Currently, abuild-keygen fails to install the pubkey to /etc/apk/keys
if it's run as a non-root user and sudo is not installed (and $SUDO
isn't set). This makes sense, however the problem is that the script goes on anyway and - to my knowledge - does not provide a trivial way to redo this process short of doing it manually yourself. While this definitely works, I think it would be preferable if the script aborted early if it is in a situation where it won't be able to execute itself in its entirety. I imagine this would be implemented by checking whether $SUDO
is an executable, and if not it checks if it can write to /etc/apk/keys
, but suggestions for better solutions are welcome.