Skip to content

Commit

Permalink
Ensure "sql-cli" command sets an error on non-zero child process exit…
Browse files Browse the repository at this point in the history
… status. (#2925)
  • Loading branch information
plach79 authored and weitzman committed Sep 1, 2017
1 parent fbeb981 commit 67254bd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion commands/sql/sql.drush.inc
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,11 @@ function drush_sql_drop() {
function drush_sql_cli() {
drush_sql_bootstrap_further();
$sql = drush_sql_get_class();
return !(bool)drush_shell_proc_open($sql->connect());
$result = !drush_shell_proc_open($sql->connect());
if (!$result) {
drush_set_error('DRUSH_SQL_CLI_ERROR', dt('SQL client error occurred.'));
}
return $result;
}

/**
Expand Down

0 comments on commit 67254bd

Please sign in to comment.