Skip to content

Commit dc795aa

Browse files
authored
Remove redundant show-verbose-logs empty-string guard (#112)
1 parent 79f7655 commit dc795aa

3 files changed

Lines changed: 3 additions & 6 deletions

File tree

dist/index.cjs

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/inputs.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@ import type { Inputs } from './types'
55
export function getInputs(): Inputs {
66
const legacyExtraArgs = core.getInput('extra_args')
77
const modernExtraArgs = core.getInput('extra-args')
8-
const showVerboseLogsInput = core.getInput('show-verbose-logs')
9-
108
return {
119
cache: core.getBooleanInput('cache'),
1210
extraArgs: legacyExtraArgs || modernExtraArgs,
1311
installOnly: core.getBooleanInput('install-only'),
1412
prekVersion: core.getInput('prek-version') || 'latest',
15-
showVerboseLogs: showVerboseLogsInput === '' ? true : core.getBooleanInput('show-verbose-logs'),
13+
showVerboseLogs: core.getBooleanInput('show-verbose-logs'),
1614
workingDirectory: core.getInput('working-directory') || '.',
1715
}
1816
}

test/inputs.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe('getInputs', () => {
2828
beforeEach(() => {
2929
vi.resetModules()
3030
vi.clearAllMocks()
31-
mockContext.inputs = { cache: 'true', 'install-only': 'false' }
31+
mockContext.inputs = { cache: 'true', 'install-only': 'false', 'show-verbose-logs': 'true' }
3232
mockContext.warnings = []
3333
})
3434

0 commit comments

Comments
 (0)