apt-key: remove carriage returns from armored keyrings before dearmoring
Without this, the awk
script returns nothing if the armored keyring uses Windows/DOS-style CRLF
line endings (since awk
is designed for
processing Unix text files). This would result in a NO_PUBKEY
error during the signature verification part of an apt-get update
.
Sometimes armored keyrings are distributed as DOS format text files, as has been reported in https://github.com/jfrog/jfrog-cli/issues/1741 and https://github.com/yarnpkg/yarn/issues/8566.