MCPcopy
hub / github.com/hashicorp/packer / Help

Method Help

command/fix.go:139–165  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

137}
138
139func (*FixCommand) Help() string {
140 helpText := `
141Usage: packer fix [options] TEMPLATE
142
143 Reads the JSON template and attempts to fix known backwards
144 incompatibilities. The fixed template will be outputted to standard out.
145
146 If the template cannot be fixed due to an error, the command will exit
147 with a non-zero exit status. Error messages will appear on standard error.
148
149Fixes that are run (in order):
150
151`
152
153 for _, name := range fix.FixerOrder {
154 helpText += fmt.Sprintf(
155 " %-27s%s\n", name, fix.Fixers[name].Synopsis())
156 }
157
158 helpText += `
159Options:
160
161 -validate=true If true (default), validates the fixed template.
162`
163
164 return strings.TrimSpace(helpText)
165}
166
167func (c *FixCommand) Synopsis() string {
168 return "fixes templates from old versions of packer"

Callers 1

ParseArgsMethod · 0.95

Calls 1

SynopsisMethod · 0.65

Tested by

no test coverage detected