Adds size output to `ui.Message` as well as if the artifact failed to
upload to atlas.
This commit is contained in:
Jake Champlin 2015-10-23 17:39:48 -07:00
parent 8e63ce1302
commit 0b6d303e65
1 changed files with 2 additions and 2 deletions

View File

@ -204,7 +204,7 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac
opts.FileSize = r.Size
}
ui.Message("Uploading artifact version...")
ui.Message(fmt.Sprintf("Uploading artifact (Size: %v)", opts.FileSize))
var av *atlas.ArtifactVersion
doneCh := make(chan struct{})
errCh := make(chan error, 1)
@ -220,7 +220,7 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac
select {
case err := <-errCh:
return nil, false, fmt.Errorf("Error uploading: %s", err)
return nil, false, fmt.Errorf("Error uploading (Size: %v): %s", opts.FileSize, err)
case <-doneCh:
}