Skip to content
This repository has been archived by the owner on Oct 13, 2020. It is now read-only.

Commit

Permalink
fix(runtime): check input path exists
Browse files Browse the repository at this point in the history
check input path exists; if it does not warn and exit

GH-10
  • Loading branch information
blake-newman committed Feb 20, 2020
1 parent fd637cd commit 5ca622d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ import fs from 'fs'
async function main(): Promise<void> {
const { token, title, path } = getInputs()

const github = new Github(token)
if (!fs.existsSync(path)) {
core.warning(`Input file ${path} does not exist`)
return
}

const github = new Github(token)
await github.createCheck(title)

const file = fs.readFileSync(path)
Expand Down

0 comments on commit 5ca622d

Please sign in to comment.