Skip to content

Commit

Permalink
Merge pull request #146 from zeabur/pan93412/fix-scratch
Browse files Browse the repository at this point in the history
  • Loading branch information
pan93412 authored Sep 25, 2023
2 parents c429bb2 + 48ff190 commit 1b6a011
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/zeaburpack/ref.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ func (rc referenceConstructor) Construct(rawRefString string) string {
return rawRefString
}

// If ref is `scratch`, we skip.
if rawRefString == "scratch" {
return rawRefString
}

// Safety: ptr != nil.
proxyRegistry := *proxyRegistryPtr

Expand Down
1 change: 1 addition & 0 deletions pkg/zeaburpack/ref_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ func TestReferenceConstructor_Construct(t *testing.T) {
"other.io/library/alpine:latest": "other.io/library/alpine:latest",
"other.io/library/alpine:3.12": "other.io/library/alpine:3.12",
"other.io:1234/library/alpine:3.12": "other.io:1234/library/alpine:3.12",
"scratch": "scratch",
}

ref := newReferenceConstructor(&proxy)
Expand Down

0 comments on commit 1b6a011

Please sign in to comment.