Skip to content

Commit

Permalink
use bun glob
Browse files Browse the repository at this point in the history
  • Loading branch information
AsafBenjaminov committed Dec 25, 2024
1 parent 6076501 commit f04a783
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/patterns.zig
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const bun = @import("root").bun;
const glob = @import("../glob.zig");
const string = bun.string;
const std = @import("std");
const c_size_t = std.c_size_t;
Expand Down Expand Up @@ -97,8 +98,8 @@ fn matchesGlob(pattern: string, target: string) bool {

pub fn matchesAnyPattern(target: string, patterns: []const string) bool {
for (patterns) |pattern| {
if (isGlobPattern(pattern)) {
if (matchesGlob(target, pattern)) {
if (glob.detectGlobSyntax(pattern)) {
if (glob.matchImpl(pattern, target)) {
return true;
}
} else {
Expand Down

0 comments on commit f04a783

Please sign in to comment.