Skip to content

Commit

Permalink
Merge pull request #1649 from smoser/fix/create-subpkgdirs-first
Browse files Browse the repository at this point in the history
Create sub-package directories in WorkDir before building subpackage
  • Loading branch information
smoser authored Nov 14, 2024
2 parents 997f9fd + 075b5fe commit 70bbb7d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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,
Expand Down

0 comments on commit 70bbb7d

Please sign in to comment.