Skip to content

Commit

Permalink
Load project plugins once project has been fully loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
soapy1 committed Oct 3, 2022
1 parent ad9b93b commit f84c0cf
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions internal/client/basis.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ func (b *Basis) DetectProject() (p *Project, err error) {
if err != nil && status.Code(err) != codes.NotFound {
return
}
dataPath, err := paths.VagrantData()
if err != nil {
return
}
b.client.LoadLocalProjectPlugins(dataPath.Join(b.basis.Name, "project", p.project.Name).String())

if err == nil {
p.vagrantfile = v
Expand All @@ -70,7 +65,7 @@ func (b *Basis) DetectProject() (p *Project, err error) {
return
}

return &Project{
projectClient := &Project{
basis: b,
client: b.client,
ctx: b.ctx,
Expand All @@ -79,7 +74,14 @@ func (b *Basis) DetectProject() (p *Project, err error) {
ui: b.ui,
vagrant: b.vagrant,
vagrantfile: v,
}, nil
}
dataPath, err := paths.VagrantData()
if err != nil {
return
}
b.client.LoadLocalProjectPlugins(dataPath.Join(b.basis.Name, "project", projectClient.project.Name).String())

return projectClient, nil
}

func (b *Basis) LoadProject(n string) (*Project, error) {
Expand Down

0 comments on commit f84c0cf

Please sign in to comment.