Change log to Ui.Warn and restore the removed functionality for now

This commit is contained in:
Chris Bednarski 2016-01-14 17:18:02 -08:00
parent 5e34864494
commit d8953e48d4
1 changed files with 4 additions and 2 deletions

View File

@ -3,7 +3,6 @@ package command
import (
"fmt"
"io"
"log"
"os"
"os/signal"
"path/filepath"
@ -55,7 +54,7 @@ func (c *PushCommand) Run(args []string) int {
}
if message != "" {
log.Printf("[WARN] -m/-message is deprecated and will be removed in a future Packer release")
c.Ui.Warn("[DEPRECATED] -m/-message is deprecated and will be removed in a future Packer release")
}
args = f.Args()
@ -191,6 +190,9 @@ func (c *PushCommand) Run(args []string) int {
// Add the upload metadata
metadata := make(map[string]interface{})
if message != "" {
metadata["message"] = message
}
metadata["template"] = tpl.RawContents
metadata["template_name"] = filepath.Base(args[0])
uploadOpts.Metadata = metadata