Commit cd0d3269 authored by Seth Vargo's avatar Seth Vargo

Allow -create to be passed still for BC

parent bfc4f4ff
...@@ -34,12 +34,14 @@ type pushUploadFn func( ...@@ -34,12 +34,14 @@ type pushUploadFn func(
func (c *PushCommand) Run(args []string) int { func (c *PushCommand) Run(args []string) int {
var token string var token string
var message string var message string
var create bool
f := flag.NewFlagSet("push", flag.ContinueOnError) f := flag.NewFlagSet("push", flag.ContinueOnError)
f.Usage = func() { c.Ui.Error(c.Help()) } f.Usage = func() { c.Ui.Error(c.Help()) }
f.StringVar(&token, "token", "", "token") f.StringVar(&token, "token", "", "token")
f.StringVar(&message, "m", "", "message") f.StringVar(&message, "m", "", "message")
f.StringVar(&message, "message", "", "message") f.StringVar(&message, "message", "", "message")
f.BoolVar(&create, "create", false, "create (deprecated)")
if err := f.Parse(args); err != nil { if err := f.Parse(args); err != nil {
return 1 return 1
} }
...@@ -50,6 +52,12 @@ func (c *PushCommand) Run(args []string) int { ...@@ -50,6 +52,12 @@ func (c *PushCommand) Run(args []string) int {
return 1 return 1
} }
// Print deprecations
if create {
c.Ui.Error(fmt.Sprintf("The '-create' option is now the default and is\n" +
"longer used. It will be removed in the next version."))
}
// Read the template // Read the template
tpl, err := packer.ParseTemplateFile(args[0], nil) tpl, err := packer.ParseTemplateFile(args[0], nil)
if err != nil { if err != nil {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment