Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EB CLI - how to suppress code commit prompt "Do you wish to continue with CodeCommit?"

Every time I use a command on the Elastic Beanstalk CLI like eb init or eb deploy it prompts me with:

Do you wish to continue with CodeCommit? (y/N) (default is n):

And I always say 'no'.

Is there a way to suppress this prompt or provide a default answer?

I have checked the EB CLI documentation but I haven't been able to find anything.

like image 907
richflow Avatar asked Feb 07 '26 04:02

richflow


2 Answers

If you're using this command programatically, you can pass a negative response to the eb init or eb deploy with a Unix command called yes - the name seems to contradict what you're trying to achieve, but it can be used to pass a user-definied string instead of the default affirmative response. Usage:

yes n | eb deploy

It will behave as if you pressed the 'n' key. Keep in mind that 'n' will be looped (it will be an answer to all the prompts during the command execution).

Another option is using printf:

printf '\n\n\n\n' | eb deploy

This would behave as if you pressed the Enter key 4 times (4 prompts).

There are some more alternatives and usage examples in this question.

like image 76
arudzinska Avatar answered Feb 09 '26 07:02

arudzinska


If you want to suppress all prompts from eb init, pass the --platform PLATFORM_NAME argument. A complete command might look like:

eb init APPLICATION_NAME \
    --region REGION_NAME \
    --platform PLATFORM_NAME
like image 31
progfan Avatar answered Feb 09 '26 07:02

progfan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!