diff --git a/main.go b/main.go index 8fe95f1..5f359b5 100644 --- a/main.go +++ b/main.go @@ -50,6 +50,11 @@ func main() { Usage: "Will execute multiple builds in parallel as defined in the template", EnvVar: "PLUGIN_TEMPLATE", }, + cli.BoolFlag{ + Name: "syntax_only", + Usage: "Only check syntax. Do not verify config of the template", + EnvVar: "PLUGIN_SYNTAX_ONLY", + }, } app.Version = Version @@ -83,12 +88,13 @@ func run(c *cli.Context) error { plugin := Plugin{ Config: Config{ - Actions: c.StringSlice("actions"), - Vars: vars, - Template: c.String("template"), - VarFiles: c.StringSlice("var_files"), - Except: c.StringSlice("except"), - Only: c.StringSlice("only"), + Actions: c.StringSlice("actions"), + Vars: vars, + Template: c.String("template"), + VarFiles: c.StringSlice("var_files"), + Except: c.StringSlice("except"), + Only: c.StringSlice("only"), + SyntaxOnly: c.Bool("syntax_only"), }, } diff --git a/plugin.go b/plugin.go index 88e1844..16cb663 100644 --- a/plugin.go +++ b/plugin.go @@ -74,7 +74,6 @@ func (p *Plugin) Exec() error { commands = append(commands, exec.Command("packer", "version")) - logrus.Println(p.Config.Actions) // Add commands listed from Actions for _, action := range p.Config.Actions { switch action {