Skip to content

Commit 803511c

Browse files
committed
chore(upstream): guard wildcard path changes
1 parent f48cac9 commit 803511c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎packages/core/src/util/wildcard.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
export * as Wildcard from "./wildcard"
22

3+
// altimate_change start — preserve POSIX backslashes when matching filesystem paths
34
export function match(input: string, pattern: string) {
45
return matchNormalized(input.replaceAll("\\", "/"), pattern.replaceAll("\\", "/"))
56
}
67

7-
// altimate_change start — preserve POSIX backslashes when matching filesystem paths
88
export function matchPath(input: string, pattern: string) {
99
if (process.platform === "win32") return match(input, pattern)
1010
return matchNormalized(input, pattern)
1111
}
12-
// altimate_change end
1312

1413
function matchNormalized(input: string, pattern: string) {
1514
let escaped = pattern
@@ -21,3 +20,4 @@ function matchNormalized(input: string, pattern: string) {
2120

2221
return new RegExp("^" + escaped + "$", process.platform === "win32" ? "si" : "s").test(input)
2322
}
23+
// altimate_change end

0 commit comments

Comments
 (0)