Skip to content

Commit

Permalink
Force forward slashes in paths
Browse files Browse the repository at this point in the history
  • Loading branch information
pahen committed Aug 22, 2016
1 parent b811754 commit e8abb7e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ class Tree {
absPath = absPath.replace(/\.\w+$/, '');
}

absPath = absPath.replace(/\\/g, '/');

return absPath;
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"mocha": "mocha test/*.js",
"watch": "mocha --watch --growl test/*.js",
"lint": "eslint bin/cli.js lib test/*.js",
"debug": "bin/cli.js --debug bin lib",
"debug": "node bin/cli.js --debug bin lib",
"generate": "npm run generate:small && npm run generate:madge",
"generate:small": "bin/cli.js --image /tmp/simple.svg test/files/cjs/circular/a.js",
"generate:madge": "bin/cli.js --image /tmp/madge.svg bin lib"
Expand Down
2 changes: 1 addition & 1 deletion test/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ describe('Madge', () => {
madge(__dirname + '/files/cjs/a.js', {graphVizPath: '/invalid/path'})
.then((res) => res.image('image.png'))
.catch((err) => {
err.message.should.eql('Could not execute /invalid/path/gvpr -V');
err.message.should.match(/Could not execute .*gvpr \-V/);
done();
});
});
Expand Down

0 comments on commit e8abb7e

Please sign in to comment.