Skip to content

Commit

Permalink
Be more specific about applying the workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
TysonAndre committed Mar 24, 2018
1 parent 9ab746b commit 86f93c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/codebase.php
Expand Up @@ -23,7 +23,9 @@
if (extension_loaded('xdebug')) {
// TODO: Remove this workaround for https://github.com/composer/xdebug-handler/issues/46 once a new xdebug-handler version is released.
// Update composer.json as well.
$_SERVER['argv'][0] = Config::projectPath($_SERVER['argv'][0]);
if (Phar::running()) {
$_SERVER['argv'][0] = Config::projectPath($_SERVER['argv'][0]);
}

// Restart if xdebug is loading, unless the environment variable PHAN_ALLOW_XDEBUG is set.
$handler = new XdebugHandler('phan');
Expand Down

0 comments on commit 86f93c6

Please sign in to comment.