diff --git a/pkg/build/build.go b/pkg/build/build.go index aefce564..c81fd48f 100644 --- a/pkg/build/build.go +++ b/pkg/build/build.go @@ -860,6 +860,10 @@ func (b *Build) BuildPackage(ctx context.Context) error { // run any pipelines for subpackages for _, sp := range b.Configuration.Subpackages { sp := sp + if err := os.MkdirAll(filepath.Join(b.WorkspaceDir, melangeOutputDirName, sp.Name), 0o755); err != nil { + return err + } + if !b.isBuildLess() { log.Infof("running pipeline for subpackage %s", sp.Name) @@ -870,10 +874,6 @@ func (b *Build) BuildPackage(ctx context.Context) error { } } - if err := os.MkdirAll(filepath.Join(b.WorkspaceDir, melangeOutputDirName, sp.Name), 0o755); err != nil { - return err - } - // add the main package to the linter queue lintTarget := linterTarget{ pkgName: sp.Name,