1 parent 616a9ce commit bfbb696Copy full SHA for bfbb696
1 file changed
packages/rstack/src/fmt/discoverPaths.ts
@@ -153,15 +153,14 @@ class GitIgnoreMatcher {
153
return loading;
154
}
155
156
- #isDirectoryIgnored(
157
- directoryPath: string,
158
- relativePath = path.relative(this.#rootPath, directoryPath),
159
- ): boolean {
+ #isDirectoryIgnored(directoryPath: string, relativePath?: string): boolean {
160
const cached = this.#ignoredDirectories.get(directoryPath);
161
if (cached !== undefined) {
162
return cached;
163
164
+ relativePath ??= path.relative(this.#rootPath, directoryPath);
+
165
// Git cannot re-include a path below an ignored directory.
166
const parentPath = path.dirname(directoryPath);
167
const ignored =
0 commit comments