Skip to content

Commit

Permalink
Enforce version as a required input
Browse files Browse the repository at this point in the history
This does not seem to be enforced by github itself :/
  • Loading branch information
JohnnyMorganz committed May 1, 2023
1 parent 9a6ec84 commit 4148a20
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions dist/index.js

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

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ async function run(): Promise<void> {
const token = core.getInput('token')
const version = core.getInput('version').trim()

if (version === '') {
throw new Error(`The 'version' input must be specified for the action!`)
}

const releases = await stylua.getReleases(token)
const release = stylua.chooseRelease(version, releases)
if (!release) {
Expand Down

0 comments on commit 4148a20

Please sign in to comment.