Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: error when removing bundles with short names #490

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading