Skip to content

Commit 6ce93a6

Browse files
#132: Avoid calling pm-updatecode-postupdate in pm-update.
1 parent 2c50bd1 commit 6ce93a6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

commands/pm/pm.drush.inc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ function pm_drush_command() {
233233
'options' => array(
234234
'notes' => 'Show release notes for each project to be updated.',
235235
'no-core' => 'Only update modules and skip the core update.',
236+
'check-updatedb' => 'Check to see if an updatedb is needed after updating the code. Default is on; use --check-updatedb=0 to disable.',
236237
) + $update_options,
237238
'sub-options' => $update_suboptions,
238239
'aliases' => array('upc'),
@@ -1280,6 +1281,7 @@ function drush_pm_refresh() {
12801281
function drush_pm_update() {
12811282
// Call pm-updatecode. updatedb will be called in the post-update process.
12821283
$args = pm_parse_arguments(func_get_args(), FALSE);
1284+
drush_set_option('check-updatedb', FALSE);
12831285
return drush_invoke('pm-updatecode', $args);
12841286
}
12851287

@@ -1313,8 +1315,7 @@ function drush_pm_updatecode_validate() {
13131315
function drush_pm_post_pm_updatecode() {
13141316
// Skip if updatecode was invoked by pm-update.
13151317
// This way we avoid being noisy, as updatedb is to be executed.
1316-
$command = drush_get_command();
1317-
if ($command['command'] != 'pm-update') {
1318+
if (drush_get_option('check-updatedb', TRUE) != FALSE) {
13181319
if (drush_get_context('DRUSH_PM_UPDATED', FALSE) !== FALSE) {
13191320
drush_invoke_process('@self', 'pm-updatecode-postupdate');
13201321
}

0 commit comments

Comments
 (0)