Closed rrrkren closed 6 years ago
The problem lies on https://github.com/markbates/grift/blob/master/cmd/grifter.go#L72,
g.GriftsPackagePath = filepath.ToSlash(filepath.Join(path.Base(currentPath), "grifts"))
assumes that the go module name is the same as the package name and the current directory name. In my case the module name was "github.com/rrrkren/testgrift". I'm fairly new to go but since this was generated by go mod I assume it's valid.
hardcoding g.GriftsPackagePath
to "github.com/rrrkren/testgrift/grifts"
makes it run, obviously not a fix but more of a hack which works for us now.
I'm going to hack something up for my use case, probably reading it off the go.mod file. Let me know if you are interested.
Steps to reproduce:
gives error:
when I do this process without the git part everything work fine