Skip to content

Commit dd244ff

Browse files
committed
Normalize path separator to slash
1 parent 038f1f1 commit dd244ff

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/Extensions.fs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,12 @@ module Path =
186186
type Absolute = string
187187
type Difference = string
188188

189+
let normalizeSlashes (path: string) =
190+
path |> String.replace "\\" "/"
191+
189192
let absolute (path: string) : Absolute =
190-
if Node.path.isAbsolute(path) then path
191-
else Node.path.resolve(path)
193+
if Node.path.isAbsolute(path) then path |> normalizeSlashes
194+
else Node.path.resolve(path) |> normalizeSlashes
192195

193196
let diff (fromPath: Absolute) (toPath: Absolute) : string =
194197
let fromPath =

0 commit comments

Comments
 (0)