title: apt-key Warning: apt-key output should not be parsed (stdout is not a terminal)
body: <p>OS: Debian 10</p>
  <p>I've tried the solution provided here: <a href="https://stackoverflow.com/questions/48162574/how-to-circumvent-apt-key-output-should-not-be-parsed">How to circumvent &quot;apt-key output should not be parsed&quot;?</a></p>
  <p>this: <code>APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn</code> - didn't work.</p>
  <p>Then I tried to do:</p>
  <pre class="lang-sh prettyprint-override"><code>DOCKER_GPG=&quot;9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88&quot;
  
  apt-key fingerprint 0EBFCD88 &gt; docker_key
  
  DOCKER_DL_GPG=$(cat docker_key | grep 9DC8)
  
  if [[ &quot;$DOCKER_GPG&quot; == &quot;$DOCKER_DL_GPG&quot; ]]; then
    # do
  else
    # don't
  fi
  </code></pre>
  <p>But, that doesn't work because the <code>apt-key</code> error exits the script (wth!)</p>
  <p>I need to install docker in a script, but can't verify the signature because of the error. It has to be automated, I don't want to skip the check there has to be a way people are doing it so, three questions:</p>
  <ol>
  <li>How else can I check a fingerprint? I tried the <code>gpg --list-keys --with-fingerprint</code> but, doesn't work.</li>
  <li>Is there another way to check docker fingerprint?</li>
  <li>How to properly use apt-key to check fingerprints in a script?</li>
  </ol>
  <p>Thank you!</p>