From 0f377203e5eda522909e2850ce395131a4113d64 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Tue, 5 Aug 2025 16:59:25 -0700 Subject: [PATCH] fix: Improve Windows path detection in configLoader MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enhanced isFilePath function to properly detect Windows absolute paths, UNC paths, and paths with file extensions. This fixes test failures on Windows where paths like "C:\Users\..." were incorrectly treated as assistant slugs instead of file paths. Changes: - Added Windows drive letter pattern detection (C:\, D:\, etc.) - Added UNC path detection (\\server\share) - Added file extension detection (.yaml, .yml, .json) Fixes Windows CI test failure: "Invalid assistant slug format" error when --config points to non-existent Windows file paths. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/configLoader.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/configLoader.ts b/src/configLoader.ts index 208c64b45..8484de0fe 100644 --- a/src/configLoader.ts +++ b/src/configLoader.ts @@ -313,7 +313,15 @@ function isFilePath(configPath: string): boolean { return ( configPath.startsWith(".") || configPath.startsWith("/") || - configPath.startsWith("~") + configPath.startsWith("~") || + // Windows absolute paths (C:\, D:\, etc.) + /^[A-Za-z]:[/\\]/.test(configPath) || + // UNC paths (\\server\share) + configPath.startsWith("\\\\") || + // Contains file extension + configPath.includes(".yaml") || + configPath.includes(".yml") || + configPath.includes(".json") ); }