Fixes Issue #1059
Adds size output to `ui.Message` as well as if the artifact failed to upload to atlas.
This commit is contained in:
parent
8e63ce1302
commit
0b6d303e65
|
@ -204,7 +204,7 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac
|
||||||
opts.FileSize = r.Size
|
opts.FileSize = r.Size
|
||||||
}
|
}
|
||||||
|
|
||||||
ui.Message("Uploading artifact version...")
|
ui.Message(fmt.Sprintf("Uploading artifact (Size: %v)", opts.FileSize))
|
||||||
var av *atlas.ArtifactVersion
|
var av *atlas.ArtifactVersion
|
||||||
doneCh := make(chan struct{})
|
doneCh := make(chan struct{})
|
||||||
errCh := make(chan error, 1)
|
errCh := make(chan error, 1)
|
||||||
|
@ -220,7 +220,7 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case err := <-errCh:
|
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:
|
case <-doneCh:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue