Skip to content

Commit babc303

Browse files
committed
Make parsing of components a bit more robust.
Suggested by @michael-simons
1 parent 5f2753d commit babc303

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

dist/main/index.js

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ async function run(): Promise<void> {
1919
const javaVersion = core.getInput(c.INPUT_JAVA_VERSION, {required: true})
2020
const componentsString: string = core.getInput(c.INPUT_COMPONENTS)
2121
const components: string[] =
22-
componentsString.length > 0 ? componentsString.split(',') : []
22+
componentsString.length > 0
23+
? componentsString.split(',').map(x => x.trim())
24+
: []
2325
const setJavaHome = core.getInput(c.INPUT_SET_JAVA_HOME) === 'true'
2426
const cache = core.getInput(c.INPUT_CACHE)
2527
const enableCheckForUpdates =

0 commit comments

Comments
 (0)