fix: disable following symlinks in glob.scan. Closes #134

This commit is contained in:
Claude 2026-02-13 19:18:42 -05:00 committed by Tobi Lütke
parent 96634da39b
commit 5dec3ab662
No known key found for this signature in database

View File

@ -1366,7 +1366,7 @@ async function indexFiles(pwd?: string, globPattern: string = DEFAULT_GLOB, coll
progress.indeterminate();
const glob = new Glob(globPattern);
const files: string[] = [];
for await (const file of glob.scan({ cwd: resolvedPwd, onlyFiles: true, followSymlinks: true })) {
for await (const file of glob.scan({ cwd: resolvedPwd, onlyFiles: true, followSymlinks: false })) {
// Skip node_modules, hidden folders (.*), and other common excludes
const parts = file.split("/");
const shouldSkip = parts.some(part =>