Skip to content

Commit

Permalink
fix: surface arguments correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
willgeorgetaylor committed Dec 29, 2023
1 parent b7f83e1 commit 7d2887e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function enumerateInputs(): Record<string, string> {
if (key.startsWith('INPUT_')) {
const inputName = key.slice('INPUT_'.length).toLowerCase()
const inputValue = process.env[key]
if (inputName !== 'version') {
if (inputValue && inputName !== 'version') {
inputs[inputName] = inputValue || ''
}
}
Expand Down Expand Up @@ -78,15 +78,16 @@ export async function run(): Promise<void> {

const inputs = enumerateInputs()
const args: string[] = Object.entries(inputs).map(
([key, value]) => `${key}=${value}`
([key, value]) => `--${key}='${value}'`
)

core.info(`Running junit-reducer with arguments: `)
core.startGroup(`Running junit-reducer with arguments: `)
core.info(
Object.entries(inputs)
.map(([key, value]) => `${key}: ${value}`)
.join('\n')
)
core.endGroup()

await exec.exec('junit-reducer', args)
} catch (error) {
Expand Down

0 comments on commit 7d2887e

Please sign in to comment.