I uncommented the code in the Guardfile that clears the theme registry with drush. On updating a layout.inc file guard gives the following error:

Change detected: layouts/mylayout/mylayout.layout.inc
'theme-registry' cache is not a valid cache type                           [error]
Cleared theme registry.

Drush doesn't like the command used in the guardfile:
drush cache-clear theme-registry

Using this works:

drush cache-clear 'theme registry'

The line in the Guardfile needs to be changed? Super Simple.

Would it be of help if I made a patch for this?

Comments

fubhy’s picture

What version of drush are you using?

"drush cc theme-registry" works for me.

I've never seen "theme registry" as a valid cache-clear key before.

janvonmulert’s picture

Ahah thats what it is thanks fubhy.
Im using older Drush 4.5 (from ubuntu repo) and according to the thread here the "drush cc theme-registry" command is broken in that version.

For anyone else using Drush 4.5 change the Guardfile to this :

    22	      puts 'Change detected: ' + m[0]
    23	      "drush cache-clear 'theme registry'"
    24	      puts 'Cleared theme registry.'
fubhy’s picture

Category: Bug report » Support request
Status: Active » Fixed

I would recommend you upgrade Drush. 4.5 is *very* old ;).

Anyways, glad you figured it out... However, consider installing drush using one of the recommended methods (pear / source). @see https://github.com/drush-ops/drush

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.