Skip to content

Commit

Permalink
Use upath to fix windows issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
robinheghan committed Mar 19, 2019
1 parent 0ec64f9 commit 5b530c4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node

const fs = require('fs');
const path = require('path');
const path = require('upath');
const url = require('url');
const gitInPath = require('simple-git');
const isGitUrl = require('is-git-url');
Expand Down Expand Up @@ -46,7 +46,7 @@ function ensureDependencies() {
// We force the seperator to be / when dealing with package.json
// This so paths don't change when windows and linux users work
// on the same repo.
(src) => !src.startsWith(storagePath.replace(path.sep, '/'))
(src) => !src.startsWith(storagePath)
);

const next = buildUpdateChain(gitDeps, writeElmJson);
Expand Down Expand Up @@ -248,10 +248,10 @@ function afterCheckout(url, repoPath, ref, opts, next) {
function populateSources(repoPath, depSources, opts, next) {
depSources = depSources
.filter((src) => {
return !src.startsWith(storagePath.replace(path.sep, '/'));
return !src.startsWith(storagePath);
})
.map((src) => {
return path.join(repoPath, src).replace(path.sep, '/');
return path.join(repoPath, src);
});

const newSources = dedupe(opts['source-directories'], depSources);
Expand Down
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"dependencies": {
"is-git-url": "^1.0.0",
"semver": "^5.5.1",
"simple-git": "^1.96.0"
"simple-git": "^1.96.0",
"upath": "^1.1.2"
},
"engines": {
"node": ">=10.0.0"
Expand Down

0 comments on commit 5b530c4

Please sign in to comment.