Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Ludvig Liljenberg <lliljenberg@microsoft.com>
  • Loading branch information
ludfjig committed Aug 30, 2023
1 parent ffa5373 commit 86fe375
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/porter/lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,14 @@ func (p *Porter) BuildActionArgs(ctx context.Context, installation storage.Insta
// https://github.com/getporter/porter/blob/17bd7816ef6bde856793f6122e32274aa9d01d1b/pkg/storage/installation.go#L350
func ensureVPrefix(opts *BundleReferenceOptions) error {
if opts._ref == nil {
idx := strings.LastIndex(opts.Reference, ":")
if idx == -1 {
return fmt.Errorf("invalid bundle reference: %s", opts.Reference)
}
if strings.HasPrefix(opts.Reference[idx+1:], "v") {
return nil
}
opts.Reference = opts.Reference[:idx] + ":v" + opts.Reference[idx+1:]
return nil
}
if strings.HasPrefix(opts._ref.Tag(), "v") {
Expand Down

0 comments on commit 86fe375

Please sign in to comment.