Skip to content

Commit

Permalink
removing redundant type specifier
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Schrottner committed Oct 14, 2021
1 parent db78afa commit 9128da9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ export async function run(): Promise<void> {
allowChecksums = core.getInput('allow-checksums')
} else {
const program = new Command()
const actionYaml: Action = jsyaml.load(await fs.promises.readFile(path.resolve('action.yml'), 'utf8')) as Action
const actionYaml = jsyaml.load(await fs.promises.readFile(path.resolve('action.yml'), 'utf8')) as Action

program
.description(actionYaml.description)

for (const [key, value] of Object.entries(actionYaml.inputs)) {
program.option('--' + key + ' <value>', value.description, value.default)
}
Object.entries(actionYaml.inputs).forEach(([key,value]) => {
program.option(`--${key} <value>`, value.description, value.default)
})

program.parse(process.argv)
const options = program.opts()
Expand Down Expand Up @@ -66,4 +66,4 @@ interface Input {
description: string;
required?: boolean;
default?: string;
}
}

0 comments on commit 9128da9

Please sign in to comment.