pkg/compiler/artifact.go: permit to support config protect with only annotation

This commit is contained in:
Daniele Rondina
2020-11-06 20:23:46 +01:00
parent 130eb8de1a
commit 51417ecb5d

View File

@@ -332,9 +332,7 @@ func (a *PackageArtifact) GetProtectFiles() []string {
ans := []string{} ans := []string{}
annotationDir := "" annotationDir := ""
if !LuetCfg.ConfigProtectSkip && if !LuetCfg.ConfigProtectSkip {
LuetCfg.GetConfigProtectConfFiles() != nil &&
len(LuetCfg.GetConfigProtectConfFiles()) > 0 {
if a.CompileSpec.GetPackage().HasAnnotation(string(pkg.ConfigProtectAnnnotation)) { if a.CompileSpec.GetPackage().HasAnnotation(string(pkg.ConfigProtectAnnnotation)) {
dir, ok := a.CompileSpec.GetPackage().GetAnnotations()[string(pkg.ConfigProtectAnnnotation)] dir, ok := a.CompileSpec.GetPackage().GetAnnotations()[string(pkg.ConfigProtectAnnnotation)]