From 136c5291d834872358c872f8931ba342d352d3fd Mon Sep 17 00:00:00 2001 From: yusyus Date: Sun, 18 Jan 2026 00:33:19 +0300 Subject: [PATCH] fix: Make 'Saved to:' regex patterns case-insensitive in install workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed case-sensitivity bug where regex patterns failed to match output messages due to case mismatch between 'saved to:' (lowercase in regex) and 'Saved to:' (uppercase in actual output). Changes: - Line 529: Added (?i) flag to config path extraction regex - Line 668: Added (?i) flag to package path extraction regex This fixes the issue where 'skill-seekers install --config react' would: 1. Successfully download and save config to disk 2. Output: '📂 Saved to: output/react.json' 3. But fail with '❌ Failed to fetch config' due to regex mismatch The workflow now correctly continues to Phase 2 (scraping) after fetching config. Also updated comment on line 528 to reflect actual output format with emoji. Fixes #236 Co-Authored-By: Claude Sonnet 4.5 --- src/skill_seekers/mcp/tools/packaging_tools.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/skill_seekers/mcp/tools/packaging_tools.py b/src/skill_seekers/mcp/tools/packaging_tools.py index bcb3fbe..e16d8f2 100644 --- a/src/skill_seekers/mcp/tools/packaging_tools.py +++ b/src/skill_seekers/mcp/tools/packaging_tools.py @@ -525,8 +525,8 @@ async def install_skill_tool(args: dict) -> list[TextContent]: output_lines.append("") # Extract config path from output - # Expected format: "✅ Config saved to: configs/react.json" - match = re.search(r"saved to:\s*(.+\.json)", fetch_output) + # Expected format: "📂 Saved to: configs/react.json" + match = re.search(r"(?i)saved to:\s*(.+\.json)", fetch_output) if match: workflow_state["config_path"] = match.group(1).strip() output_lines.append(f"✅ Config fetched: {workflow_state['config_path']}") @@ -665,7 +665,7 @@ async def install_skill_tool(args: dict) -> list[TextContent]: # Extract package path from output (supports .zip and .tar.gz) # Expected format: "Saved to: output/react.zip" or "Saved to: output/react-gemini.tar.gz" - match = re.search(r"Saved to:\s*(.+\.(?:zip|tar\.gz))", package_output) + match = re.search(r"(?i)saved to:\s*(.+\.(?:zip|tar\.gz))", package_output) if match: workflow_state["zip_path"] = match.group(1).strip() else: