How to circumvent “apt-key output should not be parsed”?
From apt-key sources, you can set APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE to a non-empty value to disable this warning. You can also use “grep -q” so you don’t need to redirect stdout in /dev/null either.