[ticket/16688] Do not restore current working dir before json file restoring

PHPBB3-16688
This commit is contained in:
rxu 2021-12-19 16:57:40 +07:00
parent d4d26987e5
commit 6404ed2502
No known key found for this signature in database
GPG key ID: 955F0567380E586A

View file

@ -185,16 +185,16 @@ class installer
} }
catch (\Exception $e) catch (\Exception $e)
{ {
$this->restore_cwd();
$this->restore_ext_json_file(); $this->restore_ext_json_file();
$this->restore_cwd();
throw new runtime_exception('COMPOSER_CANNOT_INSTALL', [], $e); throw new runtime_exception('COMPOSER_CANNOT_INSTALL', [], $e);
} }
if ($result !== 0) if ($result !== 0)
{ {
$this->restore_cwd();
$this->restore_ext_json_file(); $this->restore_ext_json_file();
$this->restore_cwd();
throw new runtime_exception($io->get_composer_error(), []); throw new runtime_exception($io->get_composer_error(), []);
} }