Skip to content

Commit

Permalink
Use package directory location instead SrcRoot (#1)
Browse files Browse the repository at this point in the history
This allow to be path-agnostic of the gizmo root location.
  • Loading branch information
obalunenko authored Nov 25, 2021
1 parent eef2f48 commit 8165a9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/prep/prep.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func getPathToPackage(importPath string) (string, error) {
return "", fmt.Errorf("failed to detect absolute path of the package %q: %v", importPath, err)
}

return filepath.Join(p.SrcRoot, p.ImportPath), nil
return filepath.Clean(p.Dir), nil
}

func generateCode(packageName, importPath string, queries []string) []byte {
Expand Down

0 comments on commit 8165a9d

Please # to comment.