-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: normalize paths to POSIX format (#332)
Normalize script paths to use POSIX format to avoid broken paths on Windows.
- Loading branch information
1 parent
fe53a3e
commit 10a5384
Showing
3 changed files
with
14 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import path from 'path'; | ||
|
||
/** | ||
* Normalizes passed in path to ensure it is always in POSIX format. | ||
*/ | ||
export function normalizePath(pathToNormalize: string): string { | ||
return pathToNormalize.split(path.sep).join(path.posix.sep); | ||
} |