packer: machine readable output for available commands

This commit is contained in:
Mitchell Hashimoto 2013-08-12 09:22:01 -07:00
parent 365efae584
commit 547d184855
1 changed files with 3 additions and 0 deletions

View File

@ -293,6 +293,9 @@ func (e *coreEnvironment) printHelp() {
synopsis = command.Synopsis()
}
// Machine-readable output of the available command
e.ui.Machine("command", key, synopsis)
// Pad the key with spaces so that they're all the same width
key = fmt.Sprintf("%v%v", key, strings.Repeat(" ", maxKeyLen-len(key)))