Do not exclude whole project dir when listing in case where project is places inside excluded dir (like /tmp or ~/tmp)

This commit is contained in:
Piotr Rogowski 2025-01-26 08:31:07 +01:00
parent 813c607440
commit 048863e039

View file

@ -34,7 +34,7 @@ export async function listFiles(dirPath: string, recursive: boolean, limit: numb
"pkg",
"Pods",
".*", // '!**/.*' excludes hidden directories, while '!**/.*/**' excludes only their contents. This way we are at least aware of the existence of hidden directories.
].map((dir) => `**/${dir}/**`)
].map((dir) => `${dirPath}/**/${dir}/**`)
const options = {
cwd: dirPath,