Skip to content

Commit

Permalink
Manually hydrate deps name in cnab representation of depsv2
Browse files Browse the repository at this point in the history
This should ideally go into the open PR

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
  • Loading branch information
carolynvs committed Feb 12, 2023
1 parent 54251e3 commit aae9178
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/cnab/dependencies_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ func (b ExtendedBundle) DependencyV2Reader() (interface{}, error) {
return nil, fmt.Errorf("could not unmarshal the dependencies extension %q: %w", string(dataB), err)
}

// Name is not persisted to json, so it needs to be hydrated manually
for depName, dep := range deps.Requires {
dep.Name = depName
deps.Requires[depName] = dep
}

return deps, nil
}

Expand Down

0 comments on commit aae9178

Please sign in to comment.