I have an install where I've moved the
plugins/ directory outside of the
craft/ directory. I've set
index.php and for web requests everything works fine.
Now I need to run a console command defined in a plugin. When I invoke the console from my shell, the default (incorrect) value for
CRAFT_PLUGINS_PATH is set and my plugin's console command is not available.
I've currently worked around this by wrapping
craft/app/etc/console/yiic.php, setting the constant before requiring
yiic.php like so:
#!/usr/bin/env php <?php define('CRAFT_PLUGINS_PATH', realpath(dirname(__FILE__) . "/../plugins").'/'); require_once(dirname(__FILE__).'/../craft/app/etc/console/yiic.php');
Is there a better way to do this / am I missing something?