From bf5c150d230088fc40271141271db12b564842c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Mon, 24 Nov 2025 12:06:01 +0100 Subject: [PATCH] fix: handle absolute paths correctly in environment variable expansion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed issue where absolute paths from environment variables (like $COMFYUI_ROOT=/workspace/ComfyUI) were being treated as relative paths and prepended with the config directory. Now checks if the expanded path is absolute (starts with /) and uses it as-is, otherwise treats it as relative to the config file directory. Before: /home/valknar/Projects/runpod//workspace/ComfyUI After: /workspace/ComfyUI 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- artifact_git_download.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/artifact_git_download.sh b/artifact_git_download.sh index 07de958..a424157 100755 --- a/artifact_git_download.sh +++ b/artifact_git_download.sh @@ -417,9 +417,15 @@ install_lib() { return 1 fi - # Custom directory relative to config file directory - local config_dir=$(dirname "$(realpath "${config_file}")") - lib_dir="$config_dir/$expanded_into" + # Check if expanded path is absolute or relative + if [[ "$expanded_into" == /* ]]; then + # Absolute path - use as-is + lib_dir="$expanded_into" + else + # Relative path - make relative to config file directory + local config_dir=$(dirname "$(realpath "${config_file}")") + lib_dir="$config_dir/$expanded_into" + fi else # Use global .arty/libs for libraries without custom 'into' lib_dir="$ARTY_LIBS_DIR/$lib_name"