Skip to content

Commit

Permalink
improvement(git): always use normalized exclude paths in repo scan …
Browse files Browse the repository at this point in the history
…mode
  • Loading branch information
vvagaytsev committed Dec 4, 2023
1 parent 3096030 commit 27d521b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/src/vcs/git-repo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { isDirectory, matchPath } from "../util/fs.js"
import fsExtra from "fs-extra"
import { pathToCacheContext } from "../cache.js"
import { FileTree } from "./file-tree.js"
import { sep } from "path"
import { normalize, sep } from "path"

const { pathExists } = fsExtra

Expand All @@ -37,6 +37,8 @@ const getIncludeExcludeFiles: IncludeExcludeFilesHandler<GitRepoGetFilesParams,
exclude = []
}

exclude = [...exclude.map(normalize)]

// We allow just passing a path like `foo` as include and exclude params
// Those need to be converted to globs, but we don't want to touch existing globs
const augmentedIncludes = include ? await augmentGlobs(path, include) : ["**/*"]
Expand Down

0 comments on commit 27d521b

Please sign in to comment.