Skip to content

Commit

Permalink
Merge pull request #21 from swaglive/bug/ignore-missing
Browse files Browse the repository at this point in the history
Fix: Bypass errors if `ignore-missing` is true
  • Loading branch information
allanlei authored Mar 25, 2024
2 parents 2c5a3fb + a2d8800 commit 4708e89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dist/index.js

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

4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export async function run(): Promise<void> {
'utf8'
))
} catch (err) {
if (err.code === 'ENOENT' && core.getBooleanInput('ignore-missing')) {
if (err.code === 'ENOENT') {
changelogBody = ''
} else {
throw err
Expand All @@ -72,7 +72,7 @@ export async function run(): Promise<void> {
)
changelog = changelog.slice(versionStartIndex)

if (versionStartIndex === -1) {
if (versionStartIndex === -1 && !core.getBooleanInput('ignore-missing')) {
return core.setFailed(`Could not find version ${versionText} in changelog`)
}

Expand Down

0 comments on commit 4708e89

Please sign in to comment.