Full path

This commit is contained in:
Danny McCormick 2019-07-10 15:26:18 -04:00
parent e07476fbe4
commit 84817402a9
2 changed files with 5 additions and 2 deletions

View File

@ -131,7 +131,7 @@ function unzipJavaDownload(repoRoot, fileEnding, destinationFolder) {
const stats = fs.statSync(jdkFile);
if (stats.isFile()) {
yield extractFiles(jdkFile, fileEnding, destinationFolder);
const jdkDirectory = fs.readdirSync(destinationFolder)[0];
const jdkDirectory = path.join(destinationFolder, fs.readdirSync(destinationFolder)[0]);
yield unpackJars(jdkDirectory, path.join(jdkDirectory, 'bin'));
return jdkDirectory;
}

View File

@ -128,7 +128,10 @@ async function unzipJavaDownload(
const stats = fs.statSync(jdkFile);
if (stats.isFile()) {
await extractFiles(jdkFile, fileEnding, destinationFolder);
const jdkDirectory = fs.readdirSync(destinationFolder)[0];
const jdkDirectory = path.join(
destinationFolder,
fs.readdirSync(destinationFolder)[0]
);
await unpackJars(jdkDirectory, path.join(jdkDirectory, 'bin'));
return jdkDirectory;
} else {