mirror of
https://github.com/actions/setup-java.git
synced 2025-04-06 12:06:08 +08:00
Full path
This commit is contained in:
parent
e07476fbe4
commit
84817402a9
@ -131,7 +131,7 @@ function unzipJavaDownload(repoRoot, fileEnding, destinationFolder) {
|
|||||||
const stats = fs.statSync(jdkFile);
|
const stats = fs.statSync(jdkFile);
|
||||||
if (stats.isFile()) {
|
if (stats.isFile()) {
|
||||||
yield extractFiles(jdkFile, fileEnding, destinationFolder);
|
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'));
|
yield unpackJars(jdkDirectory, path.join(jdkDirectory, 'bin'));
|
||||||
return jdkDirectory;
|
return jdkDirectory;
|
||||||
}
|
}
|
||||||
|
@ -128,7 +128,10 @@ async function unzipJavaDownload(
|
|||||||
const stats = fs.statSync(jdkFile);
|
const stats = fs.statSync(jdkFile);
|
||||||
if (stats.isFile()) {
|
if (stats.isFile()) {
|
||||||
await extractFiles(jdkFile, fileEnding, destinationFolder);
|
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'));
|
await unpackJars(jdkDirectory, path.join(jdkDirectory, 'bin'));
|
||||||
return jdkDirectory;
|
return jdkDirectory;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user