1

I try to create a simple deployment batch script that would work on windows.

To do that, I need to interact with Craft console app. How do I pass multiple commands to it to perform installation?

I tried this:

(echo mysql && echo localhost)|craft setup

This in theory should answer two first questions that craft console asks during installation. Unfortunetly it just caused console program to be stuck in some kind of loop when first question about the database is repeated infinitely.

1

In Windows' cmd, commands are joined by two ampersands like you specified (cd foo && dir), however in PowerShell (which Microsoft is pushing to replace cmd), commands are joined by semicolons: cd foo; dir.

Also, it looks like you have an orphan closing parentheses ) in your code. Is that supposed to be there?

  • Orphaned parentheses werejust mistake during pasting code here, just fixed. About powershell - i also tried to run script on it and i replaced && with ; but it didnt helped. – piotrpog Oct 16 '19 at 17:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.