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

Commit

Permalink
Merge pull request #92 from snyk/chore/update_func_snapshot
Browse files Browse the repository at this point in the history
fix: de/normalise all file separators in a string
  • Loading branch information
Amir Moualem authored May 26, 2019
2 parents 6ab9cae + 5c6e90c commit eee4a01
Show file tree
Hide file tree
Showing 5 changed files with 808 additions and 50 deletions.
1 change: 0 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ init:
- git config --global core.autocrlf true

shallow_clone: true
clone_depth: 1

cache:
- node_modules -> package.json
Expand Down
4 changes: 2 additions & 2 deletions lib/module-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ function normalizeScriptPath(scriptPath) {

function normaliseSeparator(pathToNormalise) {
if (path.sep === '\\') {
return pathToNormalise.replace('/', '\\');
return pathToNormalise.replace(/\//g, '\\');
}
return pathToNormalise;
}

function denormaliseSeparator(pathToDenormalise) {
if (path.sep === '\\') {
return pathToDenormalise.replace('\\', '/');
return pathToDenormalise.replace(/\\/g, '/');
}
return pathToDenormalise;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/resources/build-date.repo
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Thu, 06 Mar 2019 09:53:29 GMT
Thu, 22 May 2019 09:53:29 GMT
Loading

0 comments on commit eee4a01

Please sign in to comment.