Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

Commit c9bab85

Browse files
committed
remote image: replace prefix before parsing
Replace the "remote://" prefix before parsing the image reference. Otherwise, parsing fails unconditionally. Signed-off-by: Valentin Rothberg <[email protected]>
1 parent 2cc177d commit c9bab85

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/root.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ func getPrepperForImage(image string) (pkgutil.Prepper, error) {
145145
}
146146

147147
// either has remote prefix or has no prefix, in which case we force remote
148+
image = strings.Replace(image, RemotePrefix, "", -1)
148149
ref, err := docker.ParseReference("//" + image)
149150
if err != nil {
150151
return nil, err
@@ -167,7 +168,7 @@ func getPrepperForImage(image string) (pkgutil.Prepper, error) {
167168
}
168169

169170
return &pkgutil.CloudPrepper{
170-
Source: strings.Replace(image, RemotePrefix, "", -1),
171+
Source: image,
171172
Client: cli,
172173
ImageSource: src,
173174
}, nil

0 commit comments

Comments
 (0)