From 60fcc359a4a5e44e73f1a4dcdab488b4520aac2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Tue, 25 Nov 2025 10:55:57 +0100 Subject: [PATCH] fix: expand env vars and check absolute paths in build_reference_tree MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The build_reference_tree() function was prepending config_dir to all 'into' paths without expanding environment variables or checking if the result was absolute. This caused paths like /workspace/ai//workspace/ComfyUI instead of /workspace/ComfyUI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- artifact_git_download.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/artifact_git_download.sh b/artifact_git_download.sh index a424157..27906e3 100755 --- a/artifact_git_download.sh +++ b/artifact_git_download.sh @@ -724,8 +724,17 @@ build_reference_tree() { # Determine installation directory local lib_dir if [[ -n "$into" ]]; then - local config_dir=$(dirname "$(realpath "${effective_config}")") - lib_dir="$config_dir/$into" + # Expand environment variables + local expanded_into + expanded_into=$(expand_env_vars "$into" 2>/dev/null) || expanded_into="$into" + + # Check if expanded path is absolute + if [[ "$expanded_into" == /* ]]; then + lib_dir="$expanded_into" + else + local config_dir=$(dirname "$(realpath "${effective_config}")") + lib_dir="$config_dir/$expanded_into" + fi else lib_dir="$ARTY_LIBS_DIR/$lib_name" fi