Commands specified by global drush use an absolute path, so they start with "/" i.e. /usr/local/bin/drush/core/commands/[file].inc. But module-provided commands are local, such as modules/devel.drush.inc. As per-directory drush installations may also be used, I added a check for the string "modules" to decern between local drush installs and local Backdrop modules.
This attempts to solve https://github.com/backdrop-contrib/drush/issues/105.
Commands specified by global drush use an absolute path, so they start with "/" i.e.
/usr/local/bin/drush/core/commands/[file].inc
. But module-provided commands are local, such asmodules/devel.drush.inc
. As per-directory drush installations may also be used, I added a check for the string "modules" to decern between local drush installs and local Backdrop modules.