summaryrefslogtreecommitdiff
path: root/packages/core/src/utils/gitIgnoreParser.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/core/src/utils/gitIgnoreParser.ts')
-rw-r--r--packages/core/src/utils/gitIgnoreParser.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/core/src/utils/gitIgnoreParser.ts b/packages/core/src/utils/gitIgnoreParser.ts
index 37041272..50018bb7 100644
--- a/packages/core/src/utils/gitIgnoreParser.ts
+++ b/packages/core/src/utils/gitIgnoreParser.ts
@@ -61,7 +61,12 @@ export class GitIgnoreParser implements GitIgnoreFilter {
? path.relative(this.projectRoot, filePath)
: filePath;
- if (relativePath === '' || relativePath.startsWith('..')) {
+ if (
+ relativePath === '' ||
+ relativePath.startsWith('..') ||
+ relativePath === '/' ||
+ relativePath.startsWith('/')
+ ) {
return false;
}