Magento 2 : Run command line without prompt confirmationHow to inject Magento 2 commands in custom command?Magento 2: Controlling M2 via command line – when and why to use each commandHow the “magento setup:store-config:set --base-url” command exactly works?Installing magento from command line errorsMagento 2: Nginx pub/static not autogenerating, only works with command line static-content:deployactivate full page caching using Varnish from command lineCommand line error stock magentomagento 2.2 where to paste command lineHow to Run magento 2 command without connect putty?SSH Command Line Error on fresh install of Magento 2.2.5 on Bitnami
Watching something be written to a file live with tail
What is going on with Captain Marvel's blood colour?
Can a rocket refuel on Mars from water?
Can one be a co-translator of a book, if he does not know the language that the book is translated into?
A reference to a well-known characterization of scattered compact spaces
1960's book about a plague that kills all white people
Could gravitational lensing be used to protect a spaceship from a laser?
How much of data wrangling is a data scientist's job?
What is the intuition behind short exact sequences of groups; in particular, what is the intuition behind group extensions?
Can a virus destroy the BIOS of a modern computer?
Alternative to sending password over mail?
UK: Is there precedent for the governments e-petition site changing the direction of a government decision?
intersection of two sorted vectors in C++
What's the difference between 'rename' and 'mv'?
Stopping power of mountain vs road bike
AES: Why is it a good practice to use only the first 16bytes of a hash for encryption?
Is it canonical bit space?
Has there ever been an airliner design involving reducing generator load by installing solar panels?
Brothers & sisters
Facing a paradox: Earnshaw's theorem in one dimension
Arrow those variables!
SSH "lag" in LAN on some machines, mixed distros
Does a druid starting with a bow start with no arrows?
Why are electrically insulating heatsinks so rare? Is it just cost?
Magento 2 : Run command line without prompt confirmation
How to inject Magento 2 commands in custom command?Magento 2: Controlling M2 via command line – when and why to use each commandHow the “magento setup:store-config:set --base-url” command exactly works?Installing magento from command line errorsMagento 2: Nginx pub/static not autogenerating, only works with command line static-content:deployactivate full page caching using Varnish from command lineCommand line error stock magentomagento 2.2 where to paste command lineHow to Run magento 2 command without connect putty?SSH Command Line Error on fresh install of Magento 2.2.5 on Bitnami
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
When I run:
bin/magento setup:config:set --http-cache-hosts=172.xx.xx.xx
I get a command prompt:
Overwrite the existing configuration for http-cache-hosts?[Y/n]
I want to use this into a bash script so I do not want user interaction.
I can do it by using a hackish way, but I do not like it:
yes Y | script.sh
Is there a way to force this to use the default value Y?
magento2 magento2.2 cli command-line command
add a comment |
When I run:
bin/magento setup:config:set --http-cache-hosts=172.xx.xx.xx
I get a command prompt:
Overwrite the existing configuration for http-cache-hosts?[Y/n]
I want to use this into a bash script so I do not want user interaction.
I can do it by using a hackish way, but I do not like it:
yes Y | script.sh
Is there a way to force this to use the default value Y?
magento2 magento2.2 cli command-line command
Please do remember to accept the answer if it solved your issue.
– Vivek Kumar
Aug 23 '18 at 15:06
add a comment |
When I run:
bin/magento setup:config:set --http-cache-hosts=172.xx.xx.xx
I get a command prompt:
Overwrite the existing configuration for http-cache-hosts?[Y/n]
I want to use this into a bash script so I do not want user interaction.
I can do it by using a hackish way, but I do not like it:
yes Y | script.sh
Is there a way to force this to use the default value Y?
magento2 magento2.2 cli command-line command
When I run:
bin/magento setup:config:set --http-cache-hosts=172.xx.xx.xx
I get a command prompt:
Overwrite the existing configuration for http-cache-hosts?[Y/n]
I want to use this into a bash script so I do not want user interaction.
I can do it by using a hackish way, but I do not like it:
yes Y | script.sh
Is there a way to force this to use the default value Y?
magento2 magento2.2 cli command-line command
magento2 magento2.2 cli command-line command
edited Aug 23 '18 at 15:35
Vivek Kumar
2,5772729
2,5772729
asked Aug 23 '18 at 14:44
Elzo ValugiElzo Valugi
1408
1408
Please do remember to accept the answer if it solved your issue.
– Vivek Kumar
Aug 23 '18 at 15:06
add a comment |
Please do remember to accept the answer if it solved your issue.
– Vivek Kumar
Aug 23 '18 at 15:06
Please do remember to accept the answer if it solved your issue.
– Vivek Kumar
Aug 23 '18 at 15:06
Please do remember to accept the answer if it solved your issue.
– Vivek Kumar
Aug 23 '18 at 15:06
add a comment |
2 Answers
2
active
oldest
votes
You can use -n parameter to disable interactive mode and assume yes.
-n, --no-interaction Do not ask any interactive question
So, your final command will be
bin/magento setup:config:set --http-cache-hosts=172.xx.xx.xx -n
add a comment |
Magento documentation shows that appending -n or --no-interaction to your command should result in no interactive questions. However, in my real-world use of Magento 2.3.0 this has proven to not be the case. If I leave off the -n or --no-interaction parameters then my command is successful, though it does prompt with [Y/n]. If I include the -n or --no-interaction parameters then the command appears to succeed with no prompts. Unfortunately in reality none of the parameters end up succeeding. I don't currently have a workaround.
New contributor
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f239379%2fmagento-2-run-command-line-without-prompt-confirmation%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can use -n parameter to disable interactive mode and assume yes.
-n, --no-interaction Do not ask any interactive question
So, your final command will be
bin/magento setup:config:set --http-cache-hosts=172.xx.xx.xx -n
add a comment |
You can use -n parameter to disable interactive mode and assume yes.
-n, --no-interaction Do not ask any interactive question
So, your final command will be
bin/magento setup:config:set --http-cache-hosts=172.xx.xx.xx -n
add a comment |
You can use -n parameter to disable interactive mode and assume yes.
-n, --no-interaction Do not ask any interactive question
So, your final command will be
bin/magento setup:config:set --http-cache-hosts=172.xx.xx.xx -n
You can use -n parameter to disable interactive mode and assume yes.
-n, --no-interaction Do not ask any interactive question
So, your final command will be
bin/magento setup:config:set --http-cache-hosts=172.xx.xx.xx -n
answered Aug 23 '18 at 14:57
Vivek KumarVivek Kumar
2,5772729
2,5772729
add a comment |
add a comment |
Magento documentation shows that appending -n or --no-interaction to your command should result in no interactive questions. However, in my real-world use of Magento 2.3.0 this has proven to not be the case. If I leave off the -n or --no-interaction parameters then my command is successful, though it does prompt with [Y/n]. If I include the -n or --no-interaction parameters then the command appears to succeed with no prompts. Unfortunately in reality none of the parameters end up succeeding. I don't currently have a workaround.
New contributor
add a comment |
Magento documentation shows that appending -n or --no-interaction to your command should result in no interactive questions. However, in my real-world use of Magento 2.3.0 this has proven to not be the case. If I leave off the -n or --no-interaction parameters then my command is successful, though it does prompt with [Y/n]. If I include the -n or --no-interaction parameters then the command appears to succeed with no prompts. Unfortunately in reality none of the parameters end up succeeding. I don't currently have a workaround.
New contributor
add a comment |
Magento documentation shows that appending -n or --no-interaction to your command should result in no interactive questions. However, in my real-world use of Magento 2.3.0 this has proven to not be the case. If I leave off the -n or --no-interaction parameters then my command is successful, though it does prompt with [Y/n]. If I include the -n or --no-interaction parameters then the command appears to succeed with no prompts. Unfortunately in reality none of the parameters end up succeeding. I don't currently have a workaround.
New contributor
Magento documentation shows that appending -n or --no-interaction to your command should result in no interactive questions. However, in my real-world use of Magento 2.3.0 this has proven to not be the case. If I leave off the -n or --no-interaction parameters then my command is successful, though it does prompt with [Y/n]. If I include the -n or --no-interaction parameters then the command appears to succeed with no prompts. Unfortunately in reality none of the parameters end up succeeding. I don't currently have a workaround.
New contributor
New contributor
answered 5 hours ago
Tom VossTom Voss
11
11
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f239379%2fmagento-2-run-command-line-without-prompt-confirmation%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Please do remember to accept the answer if it solved your issue.
– Vivek Kumar
Aug 23 '18 at 15:06