Skip to content

Commit

Permalink
fix: error when removing bundles with short names
Browse files Browse the repository at this point in the history
  • Loading branch information
UncleGedd committed Mar 5, 2024
1 parent 2887fb4 commit b9c6590
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pkg/utils/oci.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"errors"
"fmt"
"slices"
"strings"

"github.com/defenseunicorns/uds-cli/src/config"
"github.com/defenseunicorns/uds-cli/src/types"
Expand Down Expand Up @@ -247,7 +248,7 @@ func GetIndex(remote *oci.OrasRemote, ref string) (*ocispec.Index, error) {
// EnsureOCIPrefix ensures oci prefix is part of provided remote source path, and adds it if it's not
func EnsureOCIPrefix(source string) string {
var ociPrefix = "oci://"
if source[:len(ociPrefix)] != ociPrefix {
if !strings.Contains(source, ociPrefix) {
return ociPrefix + source
}
return source
Expand Down

0 comments on commit b9c6590

Please sign in to comment.