Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
Fix #6823: backslash in require() on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaswerkmeister committed Dec 11, 2016
1 parent 886cb63 commit 72e9a71
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -168,7 +168,7 @@ public void resolveModule(final ArtifactResult artifact, final Module module,
if ("npm".equals(artifact.namespace())) {
try {
final File root = ((AbstractRepository)artifact.repository()).getRoot().getContent(File.class);
final String npmPath = artifact.artifact().getAbsolutePath();
final String npmPath = artifact.artifact().getAbsolutePath().replaceAll(File.separator, "/");
((JsonModule)module).setNpmPath(npmPath.substring(root.getAbsolutePath().length()+1));
module.setJsMajor(Versions.JS_BINARY_MAJOR_VERSION);
module.setJsMinor(Versions.JS_BINARY_MINOR_VERSION);
Expand Down

0 comments on commit 72e9a71

Please sign in to comment.