From 5053620b6198e04a071ce4dd899a8f9e6e1f5591 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sun, 24 May 2026 18:07:06 +0800 Subject: [PATCH] feat: auto-load local working directory registry in vendor mode --- src/bootstrap.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bootstrap.php b/src/bootstrap.php index c300e1f6..f7875e0c 100644 --- a/src/bootstrap.php +++ b/src/bootstrap.php @@ -77,5 +77,9 @@ if (filter_var(getenv('SPC_ENABLE_LOG_FILE'), FILTER_VALIDATE_BOOLEAN)) { // load core registry Registry::loadRegistry(ROOT_DIR . '/spc.registry.yml'); +// in vendor mode, auto-load the local working directory registry if it exists +if (spc_mode(SPC_MODE_VENDOR) && file_exists(WORKING_DIR . '/spc.registry.yml')) { + Registry::loadRegistry(WORKING_DIR . '/spc.registry.yml'); +} // load registries from environment variable SPC_REGISTRIES Registry::loadFromEnvOrOption();