Commit 6bcd5de6 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

command/build: Help text

parent 74d812a7
......@@ -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
}
......
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.
`
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