From 15b94c9a9bb90a755d304541e1fd9a3cd571f66f Mon Sep 17 00:00:00 2001 From: Rashad Sirajudeen Date: Mon, 1 Apr 2024 18:16:04 +0530 Subject: [PATCH] fixed minor issues and tidied up. can pass docker uri in builder.toml Signed-off-by: Rashad Sirajudeen --- pkg/client/create_builder.go | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/pkg/client/create_builder.go b/pkg/client/create_builder.go index 81337dacb..49f25495f 100644 --- a/pkg/client/create_builder.go +++ b/pkg/client/create_builder.go @@ -262,10 +262,6 @@ func (c *Client) fetchLifecycle(ctx context.Context, config pubbldr.LifecycleCon return nil, err } - fmt.Print("---> stripped tar <---\n") - printTarContents(strippedTar) - fmt.Print("---> end <---\n") - blob, err = c.downloader.Download(ctx, strippedTar) if err != nil { return nil, errors.Wrap(err, "downloading lifecycle") @@ -473,6 +469,7 @@ func stripTopLevelDir(inputTarFile string) (string, error) { } header.Name = strings.TrimPrefix(header.Name, topLevelDirName) + header.Name = strings.TrimPrefix(header.Name, "/") if err := tarWriter.WriteHeader(header); err != nil { return "", err @@ -487,25 +484,3 @@ func stripTopLevelDir(inputTarFile string) (string, error) { return outputTarFile, nil } - -func printTarContents(tarFileName string) error { - file, err := os.Open(tarFileName) - if err != nil { - return err - } - defer file.Close() - - tarReader := tar.NewReader(file) - - for { - header, err := tarReader.Next() - if err != nil { - if err == tar.ErrHeader { - break - } - return err - } - fmt.Println(header.Name) - } - return nil -}