Seed target after creation

This commit is contained in:
sophia 2022-03-16 11:59:06 -05:00 committed by Paul Hinze
parent 6313596d62
commit a7d258abb3
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0

View File

@ -220,6 +220,9 @@ func (p *Project) LoadTarget(topts ...TargetOption) (t *Target, err error) {
return nil, err
}
// Set seeds for any plugins that may be used
t.seed(nil)
if t.dir == nil {
if t.dir, err = p.dir.Target(t.target.Name); err != nil {
return nil, err
@ -239,9 +242,6 @@ func (p *Project) LoadTarget(topts ...TargetOption) (t *Target, err error) {
t.logger = t.logger.ResetNamed("vagrant.core.target")
}
// Set seeds for any plugins that may be used
t.seed(nil)
// Ensure any modifications to the target are persisted
t.Closer(func() error { return t.Save() })