Skip to content

Commit

Permalink
Don't interpolate boot_command too early (#100)
Browse files Browse the repository at this point in the history
...and initialize the interpolation context properly.
  • Loading branch information
edigaryev authored Sep 29, 2023
1 parent ed5b2b3 commit 32f4f36
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions builder/tart/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ func (b *Builder) Prepare(raws ...interface{}) (generatedVars []string, warnings
err = config.Decode(&b.config, &config.DecodeOpts{
PluginType: "packer.builder.tart",
Interpolate: true,
InterpolateFilter: &interpolate.RenderFilter{
// Postpone the boot_command interpolation because
// we don't know the HTTPIP and HTTPPort yet
Exclude: []string{"boot_command"},
},
InterpolateContext: &b.config.ctx,
}, raws...)
if err != nil {
return nil, nil, err
Expand Down

0 comments on commit 32f4f36

Please sign in to comment.