Index: trunk/phase3/maintenance/doMaintenance.php |
— | — | @@ -86,10 +86,13 @@ |
87 | 87 | |
88 | 88 | // Do the work |
89 | 89 | try { |
90 | | - $maintenance->execute(); |
| 90 | + $result = $maintenance->execute(); |
91 | 91 | } catch( MWException $mwe ) { |
92 | 92 | echo( $mwe->getText() ); |
| 93 | + $result = 1; |
93 | 94 | } |
94 | 95 | |
95 | 96 | // Potentially debug globals |
96 | 97 | $maintenance->globals(); |
| 98 | + |
| 99 | +exit( intval( $result ) ); |
Index: trunk/phase3/maintenance/Maintenance.php |
— | — | @@ -232,7 +232,7 @@ |
233 | 233 | fwrite( $f, $err . "\n" ); |
234 | 234 | fclose( $f ); |
235 | 235 | } |
236 | | - if( $die ) die(); |
| 236 | + if( $die ) exit( 1 ); |
237 | 237 | } |
238 | 238 | |
239 | 239 | /** |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -258,6 +258,7 @@ |
259 | 259 | the parser so extensions are free to implement their own <math> tag |
260 | 260 | * (bug 21047) Wrap 'cannotdelete' into a div with the generic 'error' class and |
261 | 261 | an own 'mw-error-cannotdelete' class |
| 262 | +* Maintenance scripts now set nonzero exit codes when terminating due to error |
262 | 263 | |
263 | 264 | === Bug fixes in 1.16 === |
264 | 265 | |