Skip to content

Commit

Permalink
Update oncompile.go
Browse files Browse the repository at this point in the history
  • Loading branch information
RomainMuller committed Dec 16, 2024
1 parent 0f3cb33 commit f610396
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions internal/toolexec/aspect/oncompile.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,12 @@ func (w Weaver) OnCompile(cmd *proxy.CompileCommand) (err error) {
err = writeLinkDeps(cmd, &linkDeps, orchestrionDir)
}()

var goModDir string
if goMod, err := goenv.GOMOD("."); err != nil {
return err
} else {
goModDir = filepath.Dir(goMod)
log.Tracef("Identified module directory: %s\n", goModDir)
goMod, err := goenv.GOMOD(".")
if err != nil {
return fmt.Errorf("go env GOMOD: %w", err)
}
goModDir := filepath.Dir(goMod)
log.Tracef("Identified module directory: %s\n", goModDir)

cfg, err := config.NewLoader(goModDir, false).Load()
if err != nil {
Expand Down

0 comments on commit f610396

Please sign in to comment.