comparison vendor/drush/drush/commands/core/cli.drush.inc @ 18:af1871eacc83

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:33:08 +0100
parents 129ea1e6d783
children
comparison
equal deleted inserted replaced
17:129ea1e6d783 18:af1871eacc83
12 */ 12 */
13 function cli_drush_command() { 13 function cli_drush_command() {
14 $items['core-cli'] = array( 14 $items['core-cli'] = array(
15 'description' => 'Open an interactive shell on a Drupal site.', 15 'description' => 'Open an interactive shell on a Drupal site.',
16 'remote-tty' => TRUE, 16 'remote-tty' => TRUE,
17 'aliases' => array('php'), 17 'aliases' => array('php', 'core:cli'),
18 'bootstrap' => DRUSH_BOOTSTRAP_MAX, 18 'bootstrap' => DRUSH_BOOTSTRAP_MAX,
19 'topics' => array('docs-repl'), 19 'topics' => array('docs-repl'),
20 'options' => array( 20 'options' => array(
21 'version-history' => 'Use command history based on Drupal version (Default is per site).', 21 'version-history' => 'Use command history based on Drupal version (Default is per site).',
22 'cwd' => 'Changes the working directory of the shell (Default is the project root directory)', 22 'cwd' => 'Changes the working directory of the shell (Default is the project root directory)',
27 'hidden' => TRUE, 27 'hidden' => TRUE,
28 'topic' => TRUE, 28 'topic' => TRUE,
29 'bootstrap' => DRUSH_BOOTSTRAP_NONE, 29 'bootstrap' => DRUSH_BOOTSTRAP_NONE,
30 'callback' => 'drush_print_file', 30 'callback' => 'drush_print_file',
31 'callback arguments' => array(drush_get_context('DOC_PREFIX', DRUSH_BASE_PATH) . '/docs/repl.md'), 31 'callback arguments' => array(drush_get_context('DOC_PREFIX', DRUSH_BASE_PATH) . '/docs/repl.md'),
32 'aliases' => array('docs:repl'),
32 ); 33 );
33 return $items; 34 return $items;
34 } 35 }
35 36
36 /** 37 /**
93 // This will make sure a new connection is created again in child loops. So 94 // This will make sure a new connection is created again in child loops. So
94 // any shutdown functions will still run ok after the shell has exited. 95 // any shutdown functions will still run ok after the shell has exited.
95 if ($drupal_major_version == 7) { 96 if ($drupal_major_version == 7) {
96 Database::closeConnection(); 97 Database::closeConnection();
97 } 98 }
98 99
99 // if the cwd option is passed, lets change the current working directory to wherever 100 // if the cwd option is passed, lets change the current working directory to wherever
100 // the user wants to go before we lift psysh. 101 // the user wants to go before we lift psysh.
101 if ($cwd = drush_get_option('cwd',FALSE)) { 102 if ($cwd = drush_get_option('cwd',FALSE)) {
102 chdir($cwd); 103 chdir($cwd);
103 } 104 }