Skip to content

Commit

Permalink
fix: trim ./ from local tool references
Browse files Browse the repository at this point in the history
Signed-off-by: Donnie Adams <[email protected]>
  • Loading branch information
thedadams committed Nov 20, 2024
1 parent f7bc187 commit 9fe9d65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/handlers/toolreference/toolreference.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ func isValidTool(tool gptscript.Tool) bool {

func (h *Handler) toolsToToolReferences(ctx context.Context, toolType types.ToolReferenceType, entries map[string]indexEntry) (result []client.Object) {
for name, entry := range entries {
if strings.HasPrefix(entry.Reference, ".") {
entry.Reference = h.registryURL + "/" + entry.Reference
if ref, ok := strings.CutPrefix(entry.Reference, "./"); ok {
entry.Reference = h.registryURL + "/" + ref
}

if entry.All {
Expand Down

0 comments on commit 9fe9d65

Please sign in to comment.