mirror of
https://github.com/actions/setup-java.git
synced 2025-04-04 10:50:13 +08:00
Read correct directory
This commit is contained in:
parent
69118bc9c6
commit
e07476fbe4
@ -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(tempDirectory)[0];
|
||||
const jdkDirectory = fs.readdirSync(destinationFolder)[0];
|
||||
yield unpackJars(jdkDirectory, path.join(jdkDirectory, 'bin'));
|
||||
return jdkDirectory;
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ async function unzipJavaDownload(
|
||||
const stats = fs.statSync(jdkFile);
|
||||
if (stats.isFile()) {
|
||||
await extractFiles(jdkFile, fileEnding, destinationFolder);
|
||||
const jdkDirectory = fs.readdirSync(tempDirectory)[0];
|
||||
const jdkDirectory = fs.readdirSync(destinationFolder)[0];
|
||||
await unpackJars(jdkDirectory, path.join(jdkDirectory, 'bin'));
|
||||
return jdkDirectory;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user