Skip to content

Commit

Permalink
#208, #351. FIX packager/compose: to no longer add the optional compo…
Browse files Browse the repository at this point in the history
…sed package when the user chooses to not import that composed packages.
  • Loading branch information
mike-winberry committed Mar 3, 2022
1 parent 1731cea commit b1c3ade
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/internal/packager/compose.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func GetComposedAssets() (components []types.ZarfComponent) {
importedComponents := getSubPackageAssets(component)
components = append(components, importedComponents...)

} else {
} else if !hasSubPackage(&component) {
components = append(components, component)
}
}
Expand All @@ -31,7 +31,7 @@ func getSubPackageAssets(importComponent types.ZarfComponent) (components []type
for _, componentToCompose := range importedPackage.Components {
if shouldAddImportedPackage(&componentToCompose) {
components = append(components, getSubPackageAssets(componentToCompose)...)
} else {
} else if !hasSubPackage(&componentToCompose) {
prepComponentToCompose(&componentToCompose, importedPackage.Metadata.Name, importComponent.Import.Path)
components = append(components, componentToCompose)
}
Expand Down

0 comments on commit b1c3ade

Please sign in to comment.