Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Extract right directory
  • Loading branch information
Danny McCormick
Danny McCormick committed Jul 10, 2019
commit 05dd7fbe7551937fbb5b37edfa0b0927e8be2455
4 changes: 2 additions & 2 deletions lib/installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ function getJava(versionSpec, arch, jdkFile) {
core.debug('Retrieving Jdk from local path');
const compressedFileExtension = getFileEnding(jdkFile);
let tempDir = path.join(tempDirectory, 'temp_' + Math.floor(Math.random() * 2000000000));
yield unzipJavaDownload(jdkFile, compressedFileExtension, tempDir);
toolPath = yield tc.cacheDir(tempDir, 'Java', versionSpec, arch);
const jdkDir = yield unzipJavaDownload(jdkFile, compressedFileExtension, tempDir);
toolPath = yield tc.cacheDir(jdkDir, 'Java', versionSpec, arch);
}
let extendedJavaHome = 'JAVA_HOME_' + versionSpec + '_' + arch;
core.exportVariable('JAVA_HOME', toolPath);
Expand Down
8 changes: 6 additions & 2 deletions src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,12 @@ export async function getJava(
tempDirectory,
'temp_' + Math.floor(Math.random() * 2000000000)
);
await unzipJavaDownload(jdkFile, compressedFileExtension, tempDir);
toolPath = await tc.cacheDir(tempDir, 'Java', versionSpec, arch);
const jdkDir = await unzipJavaDownload(
jdkFile,
compressedFileExtension,
tempDir
);
toolPath = await tc.cacheDir(jdkDir, 'Java', versionSpec, arch);
}

let extendedJavaHome = 'JAVA_HOME_' + versionSpec + '_' + arch;
Expand Down