Skip to content

Commit 2d7789e

Browse files
ryancbahanclaude
andcommitted
Normalize path separators in extensionFilesForConfig and webFilesForConfig
relativePath() returns OS-native separators (backslashes on Windows), so startsWith('extensions/') comparisons would fail. Normalize to forward slashes before prefix matching. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a70ecff commit 2d7789e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/app/src/cli/models/project/config-selection.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export function extensionFilesForConfig(project: Project, activeConfig: TomlFile
7676
if (!Array.isArray(configDirs) || configDirs.length === 0) {
7777
// Default: extensions/* — filter project files by path prefix
7878
return project.extensionConfigFiles.filter((file) => {
79-
const relPath = relativePath(project.directory, file.path)
79+
const relPath = relativePath(project.directory, file.path).replace(/\\/g, '/')
8080
return relPath.startsWith('extensions/')
8181
})
8282
}
@@ -90,7 +90,7 @@ export function extensionFilesForConfig(project: Project, activeConfig: TomlFile
9090
})
9191

9292
return project.extensionConfigFiles.filter((file) => {
93-
const relPath = relativePath(project.directory, file.path)
93+
const relPath = relativePath(project.directory, file.path).replace(/\\/g, '/')
9494
return dirPrefixes.some((prefix) => relPath.startsWith(prefix))
9595
})
9696
}
@@ -109,7 +109,7 @@ export function webFilesForConfig(project: Project, activeConfig: TomlFile): Tom
109109
const dirPrefixes = (configDirs as string[]).map((dir) => dir.replace(/\*.*$/, ''))
110110

111111
return project.webConfigFiles.filter((file) => {
112-
const relPath = relativePath(project.directory, file.path)
112+
const relPath = relativePath(project.directory, file.path).replace(/\\/g, '/')
113113
return dirPrefixes.some((prefix) => relPath.startsWith(prefix))
114114
})
115115
}

0 commit comments

Comments
 (0)