From: jenkins-bot Date: Wed, 11 Jul 2018 20:01:06 +0000 (+0000) Subject: Merge "shell.php: prevent permission error" X-Git-Tag: 1.34.0-rc.0~4807 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/voir.php?a=commitdiff_plain;h=a075f50a86be14347100f662ccd683af4f437090;hp=3ceaa6785b06e4f536b8d162e58e909e254f038f;p=lhc%2Fweb%2Fwiklou.git Merge "shell.php: prevent permission error" --- diff --git a/maintenance/shell.php b/maintenance/shell.php index c8a8a4527f..a67417fc09 100644 --- a/maintenance/shell.php +++ b/maintenance/shell.php @@ -67,8 +67,12 @@ class MediaWikiShell extends Maintenance { // add this after initializing the code cleaner so all the default passes get added first $traverser->addVisitor( new CodeCleanerGlobalsPass() ); - $config = new \Psy\Configuration( [ 'codeCleaner' => $codeCleaner ] ); + $config = new \Psy\Configuration(); + $config->setCodeCleaner( $codeCleaner ); $config->setUpdateCheck( \Psy\VersionUpdater\Checker::NEVER ); + // prevent https://github.com/bobthecow/psysh/issues/443 when using sudo -E + $config->setRuntimeDir( wfTempDir() ); + $shell = new \Psy\Shell( $config ); if ( $this->hasOption( 'd' ) ) { $this->setupLegacy();