Skip to content

Commit 7e0b0fb

Browse files
committed
Add the verbose knob
This can be Boolean, to toggle whether the files are shown as they are extracted, or it can be a number, in which case an update will be printed each that many files have been extracted. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent ebca0c3 commit 7e0b0fb

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ inputs:
1414
required: false
1515
description: 'Where to write the SDK files'
1616
default: ''
17+
verbose:
18+
required: false
19+
description: 'Whether to log files as they are extracted'
20+
default: '250'
1721
runs:
1822
using: 'node12'
1923
main: 'dist/index.js'

main.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ async function run(): Promise<void> {
1212
}
1313
const flavor = core.getInput('flavor')
1414
const architecture = core.getInput('architecture')
15+
const verbose = core.getInput('verbose')
1516

1617
const {artifactName, download} = await get(flavor, architecture)
1718
const outputDirectory = core.getInput('path') || `C:/${artifactName}`
1819

1920
core.info(`Downloading ${artifactName}`)
20-
await download(outputDirectory, true)
21+
await download(
22+
outputDirectory,
23+
verbose.match(/^\d+$/) ? parseInt(verbose) : verbose === 'true'
24+
)
2125
} catch (error) {
2226
core.setFailed(error.message)
2327
}

0 commit comments

Comments
 (0)