Use realpath in ApplicationBootstrap::getBootstrapDirecory()

If the CLI is called from source, the base directory is now set to the correct path.
Packagers will have to provide the path to the base directory though.
This commit is contained in:
Eric Lippmann 2014-11-12 17:10:05 +01:00
parent 4fa2340552
commit c394cd0bff
1 changed files with 3 additions and 3 deletions

View File

@ -259,15 +259,15 @@ abstract class ApplicationBootstrap
}
/**
* Get the path to the bootstrapping directory.
* Get the path to the bootstrapping directory
*
* This is usually /public for Web and EmbeddedWeb
* This is usually /public for Web and EmbeddedWeb and /bin for the CLI
*
* @return string
*/
public function getBootstrapDirecory()
{
return dirname($_SERVER['SCRIPT_FILENAME']);
return dirname(realpath($_SERVER['SCRIPT_FILENAME']));
}
/**