@@ -217,23 +217,23 @@ export class BuildScanConfig {
217
217
}
218
218
219
219
getDevelocityInjectionEnabled ( ) : boolean | undefined {
220
- return getMaybeBooleanInput ( 'develocity-injection-enabled' )
220
+ return getOptionalBooleanInput ( 'develocity-injection-enabled' )
221
221
}
222
222
223
223
getDevelocityUrl ( ) : string {
224
224
return core . getInput ( 'develocity-url' )
225
225
}
226
226
227
227
getDevelocityAllowUntrustedServer ( ) : boolean | undefined {
228
- return getMaybeBooleanInput ( 'develocity-allow-untrusted-server' )
228
+ return getOptionalBooleanInput ( 'develocity-allow-untrusted-server' )
229
229
}
230
230
231
231
getDevelocityCaptureFileFingerprints ( ) : boolean | undefined {
232
- return getMaybeBooleanInput ( 'develocity-capture-file-fingerprints' )
232
+ return getOptionalBooleanInput ( 'develocity-capture-file-fingerprints' )
233
233
}
234
234
235
235
getDevelocityEnforceUrl ( ) : boolean | undefined {
236
- return getMaybeBooleanInput ( 'develocity-enforce-url' )
236
+ return getOptionalBooleanInput ( 'develocity-enforce-url' )
237
237
}
238
238
239
239
getDevelocityPluginVersion ( ) : string {
@@ -370,14 +370,10 @@ function getBooleanInput(paramName: string, paramDefault = false): boolean {
370
370
throw TypeError ( `The value '${ paramValue } is not valid for '${ paramName } . Valid values are: [true, false]` )
371
371
}
372
372
373
- function getMaybeBooleanInput ( paramName : string ) : boolean | undefined {
373
+ function getOptionalBooleanInput ( paramName : string ) : boolean | undefined {
374
374
const paramValue = core . getInput ( paramName )
375
- switch ( paramValue ?. toLowerCase ( ) . trim ( ) ) {
376
- case 'false' :
377
- return false
378
- case 'true' :
379
- return true
380
- default :
381
- return undefined
375
+ if ( paramValue === '' ) {
376
+ return undefined
382
377
}
378
+ return getBooleanInput ( paramName )
383
379
}
0 commit comments