I get Press [ENTER] to continue or ctrl-c to cancel adding it
while using apt-get
in CircleCI.
How can I bypass it automatically?
I tried to use -y
but no effects!
This message stems from a call to add-apt-repository
.
You can circumvent it with the -y
/--yes
flag. See the manpage
for example like this:
sudo add-apt-repository --yes ppa:example/repository
Perhaps you can consider the --force-yes
flag. From the manpage:
--force-yes
Force yes; this is a dangerous option that will cause apt to continue without prompting if it is doing something potentially harmful. It should not be
used except in very special situations. Using force-yes can potentially destroy your system! Configuration Item: APT::Get::force-yes.
So... caveat emptor
You can make these flags permanent as well. Create a file in /etc/apt/apt.conf.d/, like /etc/apt/apt.conf.d/90_no_prompt with the following:
APT::Get::Assume-Yes "true";
APT::Get::force-yes "true";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With