Skip to content

Commit

Permalink
use forward slashes for glob result
Browse files Browse the repository at this point in the history
  • Loading branch information
Blugatroff committed Apr 26, 2024
1 parent c43e8b3 commit 97d2c0e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Spago/Glob.purs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ fsWalk cwd ignorePatterns includePatterns = Aff.makeAff \cb -> do
void $ Ref.modify addMatcher ignoreMatcherRef

ignoreMatcher <- Ref.read ignoreMatcherRef
let path = Path.relative cwd entry.path
let path = withForwardSlashes $ Path.relative cwd entry.path
pure $ includeMatcher path && not (ignoreMatcher path)

options = { entryFilter, deepFilter }
Expand All @@ -120,6 +120,5 @@ fsWalk cwd ignorePatterns includePatterns = Aff.makeAff \cb -> do
void $ liftEffect $ Ref.write true canceled

gitignoringGlob :: String -> Array String -> Aff (Array String)
gitignoringGlob dir patterns =
map (Path.relative dir <<< _.path)
<$> fsWalk dir [ ".git" ] patterns
gitignoringGlob dir patterns = map (withForwardSlashes <<< Path.relative dir <<< _.path)
<$> fsWalk dir [ ".git" ] patterns

0 comments on commit 97d2c0e

Please sign in to comment.