Skip to content

Commit

Permalink
adress changes
Browse files Browse the repository at this point in the history
  • Loading branch information
thesayyn committed Aug 17, 2022
1 parent 6f4e30e commit bf9d90b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions pkg/crane/append.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ import (
)

func isWindows(img v1.Image) (bool, error) {
if img == nil {
return false, nil
}
cfg, err := img.ConfigFile()
if err != nil {
return false, err
Expand All @@ -43,15 +40,15 @@ func isWindows(img v1.Image) (bool, error) {
// "windows"), the contents of the tarballs will be modified to be suitable for
// a Windows container image.`,
func Append(base v1.Image, paths ...string) (v1.Image, error) {
if base == nil {
return nil, fmt.Errorf("invalid argument: base")
}

win, err := isWindows(base)
if err != nil {
return nil, fmt.Errorf("getting base image: %w", err)
}

if base == nil {
return nil, fmt.Errorf("invalid argument: base")
}

baseMediaType, err := base.MediaType()

if err != nil {
Expand Down

0 comments on commit bf9d90b

Please sign in to comment.