1

When I use the drush site-install command and a form value contains the equal sign (an API key for example), then Drush cuts the value at the equal sign. For example:

drush si -y profile_name --account-name=... --account-pass=... --db-url=mysql:... form_name.field_name="e+gklgfssdk=jgfsfg/11iXP6VJM0MjDpRk2MEKyc="

The value of the form_name.field_name at install will be "e+gklgfssdk", the last characters are missing, Drush cuts the value at the equal sign. This is a bug? Or how can I set the correct value?

1 Answer 1

0

It looks like there isn't a way to do this, actually. The site installation code splits the string on the '=' and doesn't do any unescaping nor does it look like it would support this. I haven't tried escape()ing the value and then passing it in (so that = would become %3D) but unless you were expecting an escaped value this would probably still not work.

Depending on what you're setting, your best bet might be to do some sort of drush variable-set and set the values after the site install completes.

3
  • It does not work, the result is: e+gklgfssdk\
    – zly
    Jan 29, 2016 at 10:49
  • Thanks, then this is a bug, I reported on github (drush-ops/drush).
    – zly
    Jan 29, 2016 at 15:57
  • In my case I can not avoid, the installation process must set an API key, which contains an equal sign. I hacking my Distribution temporarly.
    – zly
    Jan 29, 2016 at 15:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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