From cd0d3269343f1665c994344708c24d7726ed40d4 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Wed, 4 Feb 2015 13:34:16 -0500 Subject: [PATCH] Allow -create to be passed still for BC --- command/push.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/command/push.go b/command/push.go index f3a790bce..74915de3f 100644 --- a/command/push.go +++ b/command/push.go @@ -34,12 +34,14 @@ type pushUploadFn func( func (c *PushCommand) Run(args []string) int { var token string var message string + var create bool f := flag.NewFlagSet("push", flag.ContinueOnError) f.Usage = func() { c.Ui.Error(c.Help()) } f.StringVar(&token, "token", "", "token") f.StringVar(&message, "m", "", "message") f.StringVar(&message, "message", "", "message") + f.BoolVar(&create, "create", false, "create (deprecated)") if err := f.Parse(args); err != nil { return 1 } @@ -50,6 +52,12 @@ func (c *PushCommand) Run(args []string) int { 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 tpl, err := packer.ParseTemplateFile(args[0], nil) if err != nil {