Skip to content

Commit

Permalink
add global lib if no lib is available
Browse files Browse the repository at this point in the history
Signed-off-by: Paulo Lopes <pmlopes@gmail.com>
  • Loading branch information
pmlopes committed Aug 17, 2019
1 parent b998f97 commit 8d05f4d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pm/src/assembly/bin/es4x-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@ arguments.push('-cp');
let launcher = path.join('node_modules', '.bin', 'es4x-launcher.jar');
let pm = `es4x-pm-${VERSION}.jar`;
if (existsSync(path.join(process.cwd(), launcher))) {
arguments.push(`${launcher}${path.delimiter}${path.join(__dirname, '..', pm)}`);
// in the case that there is a launcher we also require a .lib
let lib = path.join('node_modules', '.lib');
if (existsSync(path.join(process.cwd(), lib))) {
arguments.push(`${launcher}${path.delimiter}${path.join(__dirname, '..', pm)}`);
} else {
arguments.push(`${launcher}${path.delimiter}${path.join(__dirname, '..', 'runtime', '*')}${path.delimiter}${path.join(__dirname, '..', pm)}`);
}
} else {
arguments.push(`${path.join(__dirname, '..', 'runtime', '*')}${path.delimiter}${path.join(__dirname, '..', pm)}`);
}
Expand Down

0 comments on commit 8d05f4d

Please sign in to comment.