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

Commit e38d6cf

Browse files
committed
Do not overwrite the loaded tarball image
This commit makes sure that if the provided argument is a local tarfile, the loaded image into the `img` varible does not get overwritten by trying to fetch something from a remote registry.
1 parent 0ffd08a commit e38d6cf

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

cmd/root.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,7 @@ func getImageForName(imageName string) (pkgutil.Image, error) {
133133
if err != nil {
134134
return pkgutil.Image{}, err
135135
}
136-
}
137-
138-
if strings.HasPrefix(imageName, DaemonPrefix) {
136+
} else if strings.HasPrefix(imageName, DaemonPrefix) {
139137
// remove the daemon prefix
140138
imageName = strings.Replace(imageName, DaemonPrefix, "", -1)
141139

0 commit comments

Comments
 (0)