Skip to content

Commit

Permalink
Progress on drush-ops#2090 - runserver/d8-rs-router.php can't find in…
Browse files Browse the repository at this point in the history
…dex.php at end.
  • Loading branch information
weitzman authored and mikeker committed Aug 4, 2017
1 parent dd7f9f1 commit 83d642e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion commands/runserver/d8-rs-router.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ function runserver_env($key) {
// See https://github.com/drush-ops/drush/issues/2033 for more information.
$_SERVER['SCRIPT_NAME'] = '/index.php';

// Include the main index.php and let core take over.
// Include the main index.php and let Drupal take over.
// n.b. Drush sets the cwd to the Drupal root during bootstrap.
include 'index.php';
3 changes: 2 additions & 1 deletion commands/runserver/runserver.drush.inc
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ function drush_core_runserver($uri = NULL) {
else {
$extra = ' --define auto_prepend_file="' . __DIR__ . '/runserver-prepend.php"';
}
drush_shell_exec_interactive('%s -S ' . $addr . ':' . $uri['port'] . $extra, drush_get_option('php', 'php'));
$root = \Drush::bootstrapManager()->getRoot();
drush_shell_exec_interactive('cd %s && %s -S ' . $addr . ':' . $uri['port']. $extra, $root, drush_get_option('php', 'php'));
}

/**
Expand Down

0 comments on commit 83d642e

Please sign in to comment.