mirror of
https://github.com/helm/chart-testing.git
synced 2026-02-05 09:45:14 +01:00
Only require validation configs when validation is enabled (#87)
Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
This commit is contained in:
committed by
Scott Rigby
parent
b679b85de0
commit
ee1bd9e090
@@ -108,7 +108,7 @@ func LoadConfiguration(cfgFile string, cmd *cobra.Command, bindFlagsFunc ...func
|
||||
if chartYamlSchemaPath == "" {
|
||||
var err error
|
||||
cfgFile, err = findConfigFile("chart_schema.yaml")
|
||||
if err != nil && isLint {
|
||||
if err != nil && isLint && cfg.ValidateChartSchema {
|
||||
return nil, errors.New("'chart_schema.yaml' neither specified nor found in default locations")
|
||||
}
|
||||
cfg.ChartYamlSchema = cfgFile
|
||||
@@ -118,7 +118,7 @@ func LoadConfiguration(cfgFile string, cmd *cobra.Command, bindFlagsFunc ...func
|
||||
if lintConfPath == "" {
|
||||
var err error
|
||||
cfgFile, err = findConfigFile("lintconf.yaml")
|
||||
if err != nil && isLint {
|
||||
if err != nil && isLint && cfg.ValidateYaml {
|
||||
return nil, errors.New("'lintconf.yaml' neither specified nor found in default locations")
|
||||
}
|
||||
cfg.LintConf = cfgFile
|
||||
|
||||
Reference in New Issue
Block a user