? 721240-1.patch ? includes/table.inc Index: includes/command.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/drush/includes/command.inc,v retrieving revision 1.65 diff -u -p -r1.65 command.inc --- includes/command.inc 19 Feb 2010 16:01:27 -0000 1.65 +++ includes/command.inc 22 Feb 2010 03:53:40 -0000 @@ -499,8 +499,8 @@ function _drush_find_commandfiles($phase } // User commands, residing in ~/.drush - if (!empty($_SERVER['HOME'])) { - $searchpath[] = $_SERVER['HOME'] . '/.drush'; + if (!is_null(drush_server_home())) { + $searchpath[] = drush_server_home() . '/.drush'; } break; case DRUSH_BOOTSTRAP_DRUPAL_SITE: Index: includes/context.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/drush/includes/context.inc,v retrieving revision 1.19 diff -u -p -r1.19 context.inc --- includes/context.inc 27 Jan 2010 16:29:19 -0000 1.19 +++ includes/context.inc 22 Feb 2010 03:53:32 -0000 @@ -108,13 +108,8 @@ function _drush_config_file($context) { } // in the user home directory - // $_SERVER['HOME'] isn't set on windows and generates a Notice. - if(isset($_SERVER['HOME'])){ - $configs['user'] = $_SERVER['HOME'] . '/.drushrc.php'; - } - else{ - // home on windows - $configs['user'] = $_SERVER['HOMEDRIVE'] . $_SERVER['HOMEPATH'] . '/.drushrc.php'; + if (!is_null(drush_server_home())) { + $configs['user'] = drush_server_home() . '/.drushrc.php'; } Index: includes/environment.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/drush/includes/environment.inc,v retrieving revision 1.75 diff -u -p -r1.75 environment.inc --- includes/environment.inc 5 Feb 2010 19:11:09 -0000 1.75 +++ includes/environment.inc 22 Feb 2010 03:47:31 -0000 @@ -1064,3 +1064,20 @@ function drush_theme_get_default() { function drush_theme_get_admin() { return variable_get('admin_theme', drush_theme_get_default()); } + +/** + * Return the user's home directory. + */ + +function drush_server_home() { + $home = NULL; + // $_SERVER['HOME'] isn't set on windows and generates a Notice. + if (!empty($_SERVER['HOME'])) { + $home = $_SERVER['HOME']; + } + elseif (!empty($_SERVER['HOMEDRIVE']) && !empty($_SERVER['HOMEPATH'])) { + // home on windows + $home = $_SERVER['HOMEDRIVE'] . $_SERVER['HOMEPATH']; + } + return $home; +}