package_handler_update_project() calls drush_op('chdir', $project), which changes the working directory to an arbitrary path. This causes subsequent calls to require() to fail because the items in PHPs include path (usually ".") are not Drupal's root directory anymore.

This patch fixes the issue by calling drush_op('chdir', drush_get_context('DRUSH_DRUPAL_ROOT')) (instead of just cd ..) after the cvs update command. Another solution could entail something like

set_include_path(get_include_path() . PATH_SEPARATOR . drush_get_context('DRUSH_DRUPAL_ROOT'));

(as per the PHP manual) when drush (or Drupal core) bootstraps or initializes. I have not tested that approach since that may have negative impacts elsewhere (but may also fix similar bugs in other parts of drush).

CommentFileSizeAuthor
drush.cvs_.up_.patch830 bytesBevan

Comments

moshe weitzman’s picture

Status: Needs review » Postponed (maintainer needs more info)

still a problem with HEAD?

Bevan’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

I should have included more detail about the how to reproduce this. I am no longer able to test.