0

I'm trying to run

ddev exec drush state:set system.maintenance_mode 1

With MAMP drush state:set system.maintenance_mode 1 works fine. With ddev I get the error:

Too many arguments, expected arguments "command" "key".

I've tried every possible variation of this command I could think of, also using ddev ssh. Nothing works.

Am I missing something? Is this impossible with ddev?

6
  • It's either ddev exec "drush state:set system.maintenance_mode 1" with the quotes or ddev drush state:set system.maintenance_mode 1 without exec. Which version of DDEV? ddev --version?
    – leymannx
    Sep 7 '21 at 9:44
  • version is v1.17.7 Sep 7 '21 at 9:53
  • If have the same version. ddev drush state:set system.maintenance_mode 1 without exec works.
    – leymannx
    Sep 7 '21 at 9:55
  • ddev exec drush "state:set system.maintenance_mode 1" <br/> ddev drush "state:set system.maintenance_mode 1" <br/> ddev drush state-set "system.maintenance_mode 1" <br/> ddev exec drush state-set "system.maintenance_mode 1" <br/> ddev exec drush state:set "system.maintenance_mode 1" <br/> ddev drush state:set "system.maintenance_mode 1" <br/> I could try more versions, but shouldn't this be documented somewhere? At least, I could not find it... Sep 7 '21 at 10:30
  • I can't edit this comment anymore. Only for 5 minutes while I try to discover why line breaks don't work. Two spaces for a line break don't work here... Sep 7 '21 at 10:37

Your Answer

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

Browse other questions tagged or ask your own question.