From 0e7d61dd9f2a3d19cd8cfe8d764881692646c83f Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Thu, 25 Oct 2012 13:14:24 +0200 Subject: [PATCH] sql.php in interactive no more exit on DBerror This patch make it so that after a DBerror a new prompt is shown to the user. Save us from having to relaunch sql.php. Change-Id: Id3df3df87f6fe7b2aea31e0526c5ff697bc5832c --- maintenance/sql.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/maintenance/sql.php b/maintenance/sql.php index 04e98d918d..e8e8cb40dc 100644 --- a/maintenance/sql.php +++ b/maintenance/sql.php @@ -80,7 +80,8 @@ class MwSql extends Maintenance { $this->sqlPrintResult( $res, $dbw ); $wholeLine = ''; } catch (DBQueryError $e) { - $this->error( $e, true ); + $doDie = ! Maintenance::posix_isatty( 0 ); + $this->error( $e, $doDie ); } } } -- 2.20.1