Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vektra/mockery
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.43.1
Choose a base ref
...
head repository: vektra/mockery
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.43.2
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on May 24, 2024

  1. Fix an issue with using exclude on windows

    Ian Gregson committed May 24, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    junderw Jonathan Underwood
    Copy the full SHA
    4544845 View commit details

Commits on May 28, 2024

  1. Merge pull request #780 from iangregsondev/debugging

    Fix an issue with using exclude on windows
    LandonTClipp authored May 28, 2024
    Copy the full SHA
    5a3e47a View commit details
Showing with 9 additions and 2 deletions.
  1. +9 −2 pkg/config/config.go
11 changes: 9 additions & 2 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
@@ -708,8 +708,15 @@ func (c *Config) discoverRecursivePackages(ctx context.Context) error {
subPkgCtx := subPkgLog.WithContext(pkgCtx)

if len(conf.Exclude) > 0 {
p := pathlib.NewPath(subPkg)
relativePath, err := p.RelativeToStr(pkgPath)
// pass in the forward-slash as this is a package and the os.PathSeparator
// cannot be used here as it fails on windows.
p := pathlib.NewPath(subPkg, pathlib.PathWithSeperator("/"))
relativePath, err := p.RelativeTo(
pathlib.NewPath(
pkgPath, pathlib.PathWithAfero(p.Fs()),
pathlib.PathWithSeperator("/"),
),
)
if err != nil {
return stackerr.NewStackErrf(err, "failed to get path for %s relative to %s", subPkg, pkgPath)
}