add machine readable to the cli help func and docs (#10658)

pull/10664/head
Megan Marsh 5 years ago committed by GitHub
parent 317e2da000
commit dd167925d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -92,6 +92,7 @@ Options:
-syntax-only Only check syntax. Do not verify config of the template. -syntax-only Only check syntax. Do not verify config of the template.
-except=foo,bar,baz Validate all builds other than these. -except=foo,bar,baz Validate all builds other than these.
-machine-readable Produce machine-readable output.
-only=foo,bar,baz Validate only these builds. -only=foo,bar,baz Validate only these builds.
-var 'key=value' Variable for templates, can be used multiple times. -var 'key=value' Variable for templates, can be used multiple times.
-var-file=path JSON or HCL2 file containing user variables. -var-file=path JSON or HCL2 file containing user variables.
@ -110,10 +111,11 @@ func (*ValidateCommand) AutocompleteArgs() complete.Predictor {
func (*ValidateCommand) AutocompleteFlags() complete.Flags { func (*ValidateCommand) AutocompleteFlags() complete.Flags {
return complete.Flags{ return complete.Flags{
"-syntax-only": complete.PredictNothing, "-syntax-only": complete.PredictNothing,
"-except": complete.PredictNothing, "-except": complete.PredictNothing,
"-only": complete.PredictNothing, "-only": complete.PredictNothing,
"-var": complete.PredictNothing, "-var": complete.PredictNothing,
"-var-file": complete.PredictNothing, "-machine-readable": complete.PredictNothing,
"-var-file": complete.PredictNothing,
} }
} }

@ -40,6 +40,9 @@ Errors validating build 'vmware'. 1 error(s) occurred:
names. Build names by default are the names of their builders, unless a names. Build names by default are the names of their builders, unless a
specific `name` attribute is specified within the configuration. specific `name` attribute is specified within the configuration.
- `-machine-readable` Sets all output to become machine-readable on stdout.
Logging, if enabled, continues to appear on stderr.
- `-var` - Set a variable in your packer template. This option can be used - `-var` - Set a variable in your packer template. This option can be used
multiple times. This is useful for setting version numbers for your build. multiple times. This is useful for setting version numbers for your build.

Loading…
Cancel
Save