How to pass multiline value to drush 8 – altering robots.txt Drupal 8 module

Solved5138 viewsDrupaldrupal-8 drush robots.txt

I am trying to override the output of Robots.txt Drupal 8 module, so that it provides different values for production and UAT website. In particular, I need it to output two lines like

I am using drush 8 in your platform and it looks like

should do the job. However it ignores the “\n” character and imports it as is, instead of converting into the new line character as per Symphony specifications. Looks like drush does it’s own processing and string escaping.

This is the full command that I am trying to execute via drush:

However, the output provided by the Robots.txt module includes the “\n” instead of new line.

2

You may try writing your multi-line drush command in a text file, then use copy-and-paste directly in the terminal. This should work:

Note that the Disallow: / begins from the new line.

Write your answer.

Categories