You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when the dir config is specified as not relative to the package (doesn't use {{.InterfaceDir}} template), the generation is relative to the current working directory rather than the project root (or wherever .mockery.yaml is specified).
Mockery Version
2.42.1
Go Version
1.22.3
NOTE: Please upgrade to the latest golang version before submitting tickets!
Installation Method
Binary Distribution
Docker
brew
go install
Other: [specify]
Steps to Reproduce
write an interface in a package (or set .mockery.yaml to mock an interface from an external go module, which is the use-case i'm encountering this issue), have /mocks directory exist in project root
add a new template that indicates the .mockery.yaml location, e.g. {{.ConfigDir}}
This is a great idea and should be super easy to do. I approve of doing this, but I'm not sure when I'll have the time to get to it. Maybe in the next week or two unless anyone else wants to take it.
Description
when the
dir
config is specified as not relative to the package (doesn't use{{.InterfaceDir}}
template), the generation is relative to the current working directory rather than the project root (or wherever .mockery.yaml is specified).Mockery Version
2.42.1
Go Version
1.22.3
Installation Method
Steps to Reproduce
.mockery.yaml
to mock an interface from an external go module, which is the use-case i'm encountering this issue), have/mocks
directory exist in project rootdir
tomocks
in.mockery.yaml
, e.g.:mockery
in project root thencd mocks
and run it againExpected Behavior
the second
mockery
shouldn't add any new files since config file was not changed between the two runsActual Behavior
new mocks are created in
mocks/mocks
Proposal
add a new template that indicates the
.mockery.yaml
location, e.g.{{.ConfigDir}}
The text was updated successfully, but these errors were encountered: