diff --git a/command/build/command.go b/command/build/command.go index 8d4924f24..d631d6165 100644 --- a/command/build/command.go +++ b/command/build/command.go @@ -5,18 +5,19 @@ import ( "github.com/mitchellh/packer/packer" "io/ioutil" "log" + "strings" "sync" ) type Command byte func (Command) Help() string { - return "help" + return strings.TrimSpace(helpText) } -func (Command) Run(env packer.Environment, args []string) int { +func (c Command) Run(env packer.Environment, args []string) int { if len(args) != 1 { - env.Ui().Error("A single template argument is required.") + env.Ui().Say(c.Help()) return 1 } diff --git a/command/build/help.go b/command/build/help.go new file mode 100644 index 000000000..29f4fc3ec --- /dev/null +++ b/command/build/help.go @@ -0,0 +1,8 @@ +package build + +const helpText = ` +Usage: packer build TEMPLATE + +Will execute multiple builds in parallel as defined in the template. +The various artifacts created by the template will be outputted. +`