mirror of
https://github.com/actions/setup-java.git
synced 2025-04-20 09:56:46 +00:00
clean contents
This commit is contained in:
parent
af8b898a83
commit
c86f786dcf
2 changed files with 2 additions and 2 deletions
|
@ -25,7 +25,7 @@ async function run() {
|
|||
core.debug("JAVA_VERSION input is empty, looking for .java-version file")
|
||||
const versionFileName = '.java-version'
|
||||
const contents = fs.readFileSync(versionFileName).toString().trim();
|
||||
const cleanedStr = semver.clean(' = v 2.1.5foo', { loose: true })
|
||||
const cleanedStr = semver.clean(contents, { loose: true })
|
||||
const version = semver.valid(cleanedStr);
|
||||
core.info(version ? version : "not found")
|
||||
versions.push(contents)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue