From c394cd0bffcef10f2a29041a53a202d1bce1c453 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Wed, 12 Nov 2014 17:10:05 +0100 Subject: [PATCH] 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. --- library/Icinga/Application/ApplicationBootstrap.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/Icinga/Application/ApplicationBootstrap.php b/library/Icinga/Application/ApplicationBootstrap.php index a74a7f8c0..92fe9b660 100644 --- a/library/Icinga/Application/ApplicationBootstrap.php +++ b/library/Icinga/Application/ApplicationBootstrap.php @@ -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'])); } /**