packer: -machine-readable not double hyphen

This commit is contained in:
Mitchell Hashimoto 2013-08-11 23:26:24 -07:00
parent b3e8a41954
commit a675b89b0e
3 changed files with 3 additions and 2 deletions

View File

@ -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.

View File

@ -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])

View File

@ -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