Skip to content

Commit b88433e

Browse files
authored
Update action.yml (#1)
* Update action.yml * Update main.ts
1 parent 1e6f721 commit b88433e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ description: "Compile SQL to type-safe Go"
33
author: 'Kyle Conroy'
44
inputs:
55
sqlc-version:
6-
description: 'The version of sqlc to install. Defaults to v1.9.0'
7-
required: false
6+
description: 'The sqlc version to download (if necessary) and use.'
7+
required: true
88
branding:
99
icon: 'terminal'
1010
color: 'purple'

src/main.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ import * as tc from '@actions/tool-cache'
33

44
async function run(): Promise<void> {
55
try {
6-
const version = core.getInput('sqlc-version') || '1.9.0'
6+
const version = core.getInput('sqlc-version')
7+
if (!version) {
8+
core.setFailed(`sqlc-version not set`)
9+
return
10+
}
711
const toolDir = tc.find('sqlc', version, 'x64')
812
if (toolDir !== '') {
913
core.addPath(toolDir)

0 commit comments

Comments
 (0)