Skip to content

Commit ae61a47

Browse files
abderra7maneabmone
authored andcommitted
Update GraalJS installer for Linux and MacOS
1 parent 2989672 commit ae61a47

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

engines/graaljs/extract.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,24 @@ const extract = ({ filePath, binary, alias, os }) => {
3535
cwd: tmpPath,
3636
});
3737
}
38-
const installer = new Installer({
39-
engine: binary,
40-
path: tmpPath,
41-
});
4238
switch (os) {
4339
case 'mac64':
4440
case 'linux64': {
4541
const directoryName = fs.readdirSync(tmpPath).find(file => file.startsWith('graaljs'));
46-
const executableName = `${directoryName}/bin/js`;
47-
installer.installBinary({ [executableName]: binary });
42+
const installer = new Installer({
43+
engine: binary,
44+
path: `${tmpPath}/${directoryName}`,
45+
});
46+
installer.installBinary('bin/js', { symlink: false });
47+
installer.installBinarySymlink({ 'bin/js': binary });
48+
installer.installLibraryGlob('lib/*');
4849
break;
4950
}
5051
case 'win64': {
52+
const installer = new Installer({
53+
engine: binary,
54+
path: tmpPath,
55+
});
5156
const directoryName = fs.readdirSync(tmpPath).find(file => file.startsWith('graaljs'));
5257
const executableName = `${directoryName}\\bin\\js.exe`;
5358
installer.installBinary(

0 commit comments

Comments
 (0)