mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
Handle illegal verbose value (#1485)
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
This commit is contained in:
parent
3a4d4b2de7
commit
363f69da29
@ -155,9 +155,11 @@ func PrepareConfig(cmd *cobra.Command, metadata *config.StepData, stepName strin
|
||||
GeneralConfig.NoTelemetry = true
|
||||
}
|
||||
|
||||
if !GeneralConfig.Verbose {
|
||||
if stepConfig.Config["verbose"] != nil && stepConfig.Config["verbose"].(bool) {
|
||||
log.SetVerbose(stepConfig.Config["verbose"].(bool))
|
||||
if !GeneralConfig.Verbose && stepConfig.Config["verbose"] != nil {
|
||||
if verboseValue, ok := stepConfig.Config["verbose"].(bool); ok {
|
||||
log.SetVerbose(verboseValue)
|
||||
} else {
|
||||
return fmt.Errorf("invalid value for parameter verbose: '%v'", stepConfig.Config["verbose"])
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user