From a9e3a1675956076f849f5e3cb4b1164835ea9fc5 Mon Sep 17 00:00:00 2001 From: Jepi Oktamipa Date: Thu, 3 Sep 2026 00:23:40 +0700 Subject: [PATCH] fix: #72 resolve paths from TYPEPHP_HOME before getcwd --- src/compiler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler.php b/src/compiler.php index 6629841f..31111069 100644 --- a/src/compiler.php +++ b/src/compiler.php @@ -13,7 +13,7 @@ function main(int $argc, array $argv): void ini_set('memory_limit', '-1'); if (!defined('TYPEPHP_ROOT_PATH')) { - define('TYPEPHP_ROOT_PATH', getcwd()); + define('TYPEPHP_ROOT_PATH', getenv("TYPEPHP_HOME") ?: getcwd()); } if (!defined('TYPEPHP_DEBUG')) { define('TYPEPHP_DEBUG', true);