Skip to content

Commit 47a36b3

Browse files
committed
fix: linter shouldn't complain on finalize on steps missing
This was discovered with `tools`/`base`, as it only introduces common runtime dependencies while not doing any build steps, so missing `finalize` is harmless. https://github.com/talos-systems/tools/blob/master/base/pkg.yaml Signed-off-by: Andrey Smirnov <[email protected]>
1 parent 4f43f7e commit 47a36b3

File tree

1 file changed

+1
-1
lines changed
  • internal/pkg/types/v1alpha2

1 file changed

+1
-1
lines changed

internal/pkg/types/v1alpha2/pkg.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func (p *Pkg) Validate() error {
7070
multiErr = multierror.Append(multiErr, errors.New("package name can't be empty"))
7171
}
7272

73-
if len(p.Finalize) == 0 {
73+
if len(p.Steps) > 0 && len(p.Finalize) == 0 {
7474
multiErr = multierror.Append(multiErr, errors.New("finalize steps are missing, this is going to lead to empty build"))
7575
}
7676

0 commit comments

Comments
 (0)