Skip to content

Commit

Permalink
fix: stop using path.posix (#590)
Browse files Browse the repository at this point in the history
Co-authored-by: azu <azu@users.noreply.github.com>
  • Loading branch information
risu729 and azu committed Aug 5, 2023
1 parent 229cca7 commit 45126d3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/secretlint/src/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ export type SearchFilesOptions = {
};

const mapGitIgnorePatternTo = (base: string) => (ignore: string) => {
if (ignore.startsWith("!")) {
return "!" + path.posix.resolve(path.posix.join(base, ignore.slice(1)));
}

return path.posix.resolve(path.posix.join(base, ignore));
const mapped = ignore.startsWith("!")
? "!" + path.resolve(path.join(base, ignore.slice(1)))
: path.resolve(path.join(base, ignore));
return mapped.replace(/\\/g, "/");
};
/**
* globby wrapper that support ignore options
Expand Down

0 comments on commit 45126d3

Please sign in to comment.