From a675b89b0ec530e76f976ba9b8311201e4106da2 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 11 Aug 2013 23:26:24 -0700 Subject: [PATCH] packer: -machine-readable not double hyphen --- command/build/help.go | 1 + packer.go | 2 +- packer/environment.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/command/build/help.go b/command/build/help.go index 07c247c23..65ec5eb65 100644 --- a/command/build/help.go +++ b/command/build/help.go @@ -10,6 +10,7 @@ Options: -debug Debug mode enabled for builds -force Force a build to continue if artifacts exist, deletes existing artifacts + -machine-readable Machine-readable output -except=foo,bar,baz Build all builds other than these -only=foo,bar,baz Only build the given builds by name -var 'key=value' Variable for templates, can be used multiple times. diff --git a/packer.go b/packer.go index aa53fe57d..c14d778f5 100644 --- a/packer.go +++ b/packer.go @@ -122,7 +122,7 @@ func main() { // to remove this flag. func extractMachineReadable(args []string) ([]string, bool) { for i, arg := range args { - if arg == "--machine-readable" { + if arg == "-machine-readable" { // We found it. Slice it out. result := make([]string, len(args)-1) copy(result, args[:i]) diff --git a/packer/environment.go b/packer/environment.go index 4a14b48ed..1ef6c5c2a 100644 --- a/packer/environment.go +++ b/packer/environment.go @@ -301,7 +301,7 @@ func (e *coreEnvironment) printHelp() { } e.ui.Say("\nGlobally recognized options:") - e.ui.Say(" --machine-readable Machine-readable output format.") + e.ui.Say(" -machine-readable Machine-readable output format.") } // Returns the UI for the environment. The UI is the interface that should