Skip to content

Commit

Permalink
fix absolute path check
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperchupuDev committed Sep 29, 2024
1 parent 4f0d9d2 commit d7438aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ function normalizePattern(
result += '/**';
}

if (path.isAbsolute(result)) {
// TODO: use a better regex for this
if (path.isAbsolute(result.replace(/\\/g, ''))) {
result = posix.relative(cwd, result);
} else {
result = posix.normalize(result);
Expand Down

0 comments on commit d7438aa

Please sign in to comment.