Merge "sql.php in interactive no more exit on DBerror"
authorDemon <chadh@wikimedia.org>
Thu, 25 Oct 2012 13:31:39 +0000 (13:31 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 25 Oct 2012 13:31:39 +0000 (13:31 +0000)
maintenance/sql.php

index 04e98d9..e8e8cb4 100644 (file)
@@ -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 );
                        }
                }
        }