Magento 2 : Run command line without prompt confirmation
.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 6 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