fix: Improve Windows path detection in configLoader
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 <noreply@anthropic.com>
This commit is contained in:
parent
3549ba75e1
commit
0f377203e5
1 changed files with 9 additions and 1 deletions
|
|
@ -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")
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue