Skip to content
This repository was archived by the owner on Jun 2, 2022. It is now read-only.

Commit eee4a01

Browse files
author
Amir Moualem
authored
Merge pull request #92 from snyk/chore/update_func_snapshot
fix: de/normalise all file separators in a string
2 parents 6ab9cae + 5c6e90c commit eee4a01

File tree

5 files changed

+808
-50
lines changed

5 files changed

+808
-50
lines changed

appveyor.yml

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ init:
1010
- git config --global core.autocrlf true
1111

1212
shallow_clone: true
13-
clone_depth: 1
1413

1514
cache:
1615
- node_modules -> package.json

lib/module-utils.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ function normalizeScriptPath(scriptPath) {
3939

4040
function normaliseSeparator(pathToNormalise) {
4141
if (path.sep === '\\') {
42-
return pathToNormalise.replace('/', '\\');
42+
return pathToNormalise.replace(/\//g, '\\');
4343
}
4444
return pathToNormalise;
4545
}
4646

4747
function denormaliseSeparator(pathToDenormalise) {
4848
if (path.sep === '\\') {
49-
return pathToDenormalise.replace('\\', '/');
49+
return pathToDenormalise.replace(/\\/g, '/');
5050
}
5151
return pathToDenormalise;
5252
}

lib/resources/build-date.repo

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Thu, 06 Mar 2019 09:53:29 GMT
1+
Thu, 22 May 2019 09:53:29 GMT

0 commit comments

Comments
 (0)