diff --git a/src/setup-java.ts b/src/setup-java.ts index 916d184..a253b13 100644 --- a/src/setup-java.ts +++ b/src/setup-java.ts @@ -1,7 +1,12 @@ import fs from 'fs'; import * as core from '@actions/core'; import * as auth from './auth'; -import { getBooleanInput, isCacheFeatureAvailable, getVersionFromFileContent, avoidOldNotation } from './util'; +import { + getBooleanInput, + isCacheFeatureAvailable, + getVersionFromFileContent, + avoidOldNotation +} from './util'; import * as toolchains from './toolchains'; import * as constants from './constants'; import { restore } from './cache'; @@ -120,4 +125,3 @@ interface installerInputsOptions { jdkFile: string; toolchainIds: Array; } - diff --git a/src/util.ts b/src/util.ts index 4ad22a1..9303e7f 100644 --- a/src/util.ts +++ b/src/util.ts @@ -100,8 +100,10 @@ export function isCacheFeatureAvailable(): boolean { return true; } - -export function getVersionFromFileContent(content: string, distributionName: string): string | null { +export function getVersionFromFileContent( + content: string, + distributionName: string +): string | null { const javaVersionRegExp = /(?(?<=(^|\s|\-))(\d+\S*))(\s|$)/; const fileContent = content.match(javaVersionRegExp)?.groups?.version ? (content.match(javaVersionRegExp)?.groups?.version as string)