From d621c51b2ce1c2e1781ffb44b15c2a76a5ee0069 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sun, 14 Dec 2014 12:36:58 +0000 Subject: [PATCH] Bullet-proof global composer instantiation --- src/Composer/Factory.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Composer/Factory.php b/src/Composer/Factory.php index 8f7ba28e0..0eb428657 100644 --- a/src/Composer/Factory.php +++ b/src/Composer/Factory.php @@ -353,12 +353,12 @@ class Factory } $composer = null; - chdir($config->get('home')); try { + chdir($config->get('home')); $composer = self::createComposer($io, null, $disablePlugins, false); } catch (\Exception $e) { } - chdir($oldCwd); + @chdir($oldCwd); return $composer; }