Почему вывод apt-key не должен анализироваться ?

Чтобы проверить, установлен ли ключ gpg Docker, я запустил:

sudo apt-key fingerprint 0EBFCD88 | grep "9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88"

, который привел к следующему выводу:

Warning: apt-key output should not be parsed (stdout is not a terminal)
      9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88

Я нашел этот вопрос Stackoverflow о том, как обойти предупреждение, но я не смог найти никаких источников о том, почему оно появляется в первую очередь? По какой причине ты не должен t parse apt-key output?

1
задан 7 May 2020 в 19:23

1 ответ

Из man apt-key :

DESCRIPTION
   apt-key is used to manage the list of keys used by apt to authenticate
   packages. Packages which have been authenticated using these keys will
   be considered trusted.
   Note that if usage of apt-key is desired the additional installation of
   the GNU Privacy Guard suite (packaged in gnupg) is required. For this
   reason alone the programmatic usage (especially in package maintainer
   scripts!) is strongly discouraged. Further more the output format of all
   commands is undefined and can and does change whenever the underlying
   commands change.  apt-key will try to detect such usage and generates
   warnings on stderr in these cases.
2
ответ дан 19 June 2020 в 21:42

Другие вопросы по тегам:

Похожие вопросы: