@ -50,7 +50,11 @@ class XdebugHandler
*/
public function check()
{
if (!$this->needsRestart()) {
if ($this->needsRestart()) {
$this->prepareRestart($command) && $this->restart($command);
return;
}
$originalIniScanDir = getenv(self::ENV_INI_SCAN_DIR_OLD);
if ($originalIniScanDir) {
@ -59,13 +63,6 @@ class XdebugHandler
} else {
putenv(self::ENV_INI_SCAN_DIR);
if ($this->prepareRestart($command)) {
$this->restart($command);
/**