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;








1















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?










share|improve this question
























  • Please do remember to accept the answer if it solved your issue.

    – Vivek Kumar
    Aug 23 '18 at 15:06

















1















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?










share|improve this question
























  • Please do remember to accept the answer if it solved your issue.

    – Vivek Kumar
    Aug 23 '18 at 15:06













1












1








1








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?










share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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

















  • 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










2 Answers
2






active

oldest

votes


















2














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





share|improve this answer






























    0














    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.






    share|improve this answer








    New contributor




    Tom Voss is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.




















      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
      );



      );













      draft saved

      draft discarded


















      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









      2














      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





      share|improve this answer



























        2














        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





        share|improve this answer

























          2












          2








          2







          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





          share|improve this answer













          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






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Aug 23 '18 at 14:57









          Vivek KumarVivek Kumar

          2,5772729




          2,5772729























              0














              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.






              share|improve this answer








              New contributor




              Tom Voss is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.
























                0














                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.






                share|improve this answer








                New contributor




                Tom Voss is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






















                  0












                  0








                  0







                  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.






                  share|improve this answer








                  New contributor




                  Tom Voss is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.










                  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.







                  share|improve this answer








                  New contributor




                  Tom Voss is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  share|improve this answer



                  share|improve this answer






                  New contributor




                  Tom Voss is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  answered 5 hours ago









                  Tom VossTom Voss

                  11




                  11




                  New contributor




                  Tom Voss is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.





                  New contributor





                  Tom Voss is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






                  Tom Voss is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.



























                      draft saved

                      draft discarded
















































                      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.




                      draft saved


                      draft discarded














                      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





















































                      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







                      Popular posts from this blog

                      Disable / Remove link to Product Items in Cart Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?How can I limit products that can be bought / added to cart?Remove item from cartHide “Add to Cart” button if specific products are already in cart“Prettifying” the custom options in cart pageCreate link in cart sidebar to view all added items After limit reachedLink products together in checkout/cartHow to Get product from cart and add it againHide action-edit on cart page if simple productRemoving Cart items - ObserverRemove wishlist items when added to cart

                      Helsingin valtaus Sisällysluettelo Taustaa | Yleistä sotatoimista | Osapuolet | Taistelut Helsingin ympäristössä | Punaisten antautumissuunnitelma | Taistelujen kulku Helsingissä | Valtauksen jälkeen | Tappiot | Muistaminen | Kirjallisuutta | Lähteet | Aiheesta muualla | NavigointivalikkoTeoksen verkkoversioTeoksen verkkoversioGoogle BooksSisällissota Helsingissä päättyi tasan 95 vuotta sittenSaksalaisten ylivoima jyräsi punaisen HelsinginSuomalaiset kuvaavat sotien jälkiä kaupungeissa – katso kuvat ja tarinat tutuilta kulmiltaHelsingin valtaus 90 vuotta sittenSaksalaiset valtasivat HelsinginHyökkäys HelsinkiinHelsingin valtaus 12.–13.4. 1918Saksalaiset käyttivät ihmiskilpiä Helsingin valtauksessa 1918Teoksen verkkoversioTeoksen verkkoversioSaksalaiset hyökkäävät Etelä-SuomeenTaistelut LeppävaarassaSotilaat ja taistelutLeppävaara 1918 huhtikuussa. KapinatarinaHelsingin taistelut 1918Saksalaisten voitonparaati HelsingissäHelsingin valtausta juhlittiinSaksalaisten Helsinki vuonna 1918Helsingin taistelussa kaatuneet valkokaartilaisetHelsinkiin haudatut taisteluissa kaatuneet punaiset12.4.1918 Helsingin valtauksessa saksalaiset apujoukot vapauttavat kaupunginVapaussodan muistomerkkejä Helsingissä ja pääkaupunkiseudullaCrescendo / Vuoden 1918 Kansalaissodan uhrien muistomerkkim

                      Adjektiivitarina Tarinan tekeminen | Esimerkki: ennen | Esimerkki: jälkeen | Navigointivalikko