Skip to content

Commit

Permalink
Fix module loading on systems that use '\' instead of '/' as the path…
Browse files Browse the repository at this point in the history
… separator.
  • Loading branch information
mpiroc committed Aug 22, 2018
1 parent 62a2e9f commit 9e42991
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/jsii-kernel/lib/kernel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class Kernel {
await fs.move(path.join(staging, 'package'), packageDir);

// load the module and capture it's closure
const closure = this._execute(`require("${packageDir}")`, packageDir);
const closure = this._execute(`require(String.raw\`${packageDir}\`)`, packageDir);
const assm = new Assembly(assmSpec, closure);
this._addAssembly(assm);

Expand Down

0 comments on commit 9e42991

Please sign in to comment.