Skip to content

Commit

Permalink
format and enforce bundle names on creation
Browse files Browse the repository at this point in the history
  • Loading branch information
catsby committed Sep 9, 2024
1 parent 56c3a17 commit c2fa448
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/pkg/bundle/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ func (b *Bundle) Create() error {
return err
}

// validate bundle name to avoid bad characters
name, err := utils.FormatBundleName(b.bundle.Metadata.Name)
if err != nil {
return err
}
b.bundle.Metadata.Name = name

// confirm creation
if ok := b.confirmBundleCreation(); !ok {
return fmt.Errorf("bundle creation cancelled")
Expand Down

0 comments on commit c2fa448

Please sign in to comment.