From c744e8b2bbaf2d752bfb1536f41b17f774f5d064 Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Fri, 17 Aug 2018 09:29:39 +0200 Subject: [PATCH] make download messages less redudant and more simple --- common/step_download.go | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/common/step_download.go b/common/step_download.go index 071f2d44f..9110653b2 100644 --- a/common/step_download.go +++ b/common/step_download.go @@ -6,7 +6,6 @@ import ( "encoding/hex" "fmt" "log" - "strings" "time" "github.com/hashicorp/packer/helper/multistep" @@ -67,7 +66,7 @@ func (s *StepDownload) Run(_ context.Context, state multistep.StateBag) multiste } } - ui.Say(fmt.Sprintf("Downloading, copying or inplace referencing %s", s.Description)) + ui.Say(fmt.Sprintf("Retrieving %s", s.Description)) // First try to use any already downloaded file // If it fails, proceed to regular download logic @@ -112,14 +111,10 @@ func (s *StepDownload) Run(_ context.Context, state multistep.StateBag) multiste if finalPath == "" { for i, url := range s.Url { - if strings.HasPrefix(url, "file://") { - if s.Inplace { - ui.Message(fmt.Sprintf("Inplace referencing: %s", url)) - } else { - ui.Message(fmt.Sprintf("Copying: %s", url)) - } + if s.Inplace { + ui.Message(fmt.Sprintf("Using file in-place: %s", url)) } else { - ui.Message(fmt.Sprintf("Downloading: %s", url)) + ui.Message(fmt.Sprintf("Transferring file from path: %s", url)) } config := downloadConfigs[i]