diff --git a/src/Composer/Console/Application.php b/src/Composer/Console/Application.php index 8684ea3ed..9d3557e27 100644 --- a/src/Composer/Console/Application.php +++ b/src/Composer/Console/Application.php @@ -311,9 +311,7 @@ class Application extends BaseApplication // chdir back to $oldWorkingDir if set if (isset($oldWorkingDir)) { - Silencer::call(function () use ($oldWorkingDir) { - chdir($oldWorkingDir); - }); + Silencer::call('chdir', $oldWorkingDir); } if (isset($startTime)) {