Format and Lint code

This commit is contained in:
IvanZosimov 2023-04-03 16:43:33 +02:00
parent 9acb3930fa
commit 55a453935f
2 changed files with 27 additions and 8 deletions

View file

@ -47,7 +47,7 @@ export class LocalDistribution extends JavaBase {
const archivePath = path.join(extractedJavaPath, archiveName);
const javaVersion = this.version;
let javaPath = await tc.cacheDir(
const javaPath = await tc.cacheDir(
archivePath,
this.toolcacheFolderName,
this.getToolcacheVersionName(javaVersion),
@ -61,7 +61,10 @@ export class LocalDistribution extends JavaBase {
}
// JDK folder may contain postfix "Contents/Home" on macOS
const macOSPostfixPath = path.join(foundJava.path, MACOS_JAVA_CONTENT_POSTFIX);
const macOSPostfixPath = path.join(
foundJava.path,
MACOS_JAVA_CONTENT_POSTFIX
);
if (process.platform === 'darwin' && fs.existsSync(macOSPostfixPath)) {
foundJava.path = macOSPostfixPath;
}