From 1bf2bade7dc352c4f5e06a918b50ffd5ec13f6ff Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 12 Aug 2013 09:22:01 -0700 Subject: [PATCH] packer: machine readable output for available commands --- packer/environment.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packer/environment.go b/packer/environment.go index 1ef6c5c2a..0cbb8a95b 100644 --- a/packer/environment.go +++ b/packer/environment.go @@ -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)))