Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix an issue with using exclude on windows #780

Merged
merged 1 commit into from
May 28, 2024

Conversation

iangregsondev
Copy link

Description

Using exclude either in the mockery.yaml or on the command line would throw an error on Windows. This was due to the path separator on package names, it would try to use the Windows separator which is a backslash and not a forward slash.

  • Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Version of Golang used when building/testing:

  • 1.11
  • 1.12
  • 1.13
  • 1.14
  • 1.15
  • 1.16
  • 1.17
  • 1.18
  • 1.19
  • 1.20

How Has This Been Tested?

It was tested on a real windows machine.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copy link
Collaborator

@LandonTClipp LandonTClipp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. Can you undo the formatting changes? It's hard to decipher if any logical bits in the apparently format-only changes were modified.

Also, could you see if there's a way to test this? We don't have a good testing story for Windows unfortunately, so maybe the answer is no.

@iangregsondev
Copy link
Author

Sure, my IDE did that :-( I will undo the formatting changes. Probably be tomorrow now.

I don't see how I am able to test it to be truthful.

@iangregsondev
Copy link
Author

@LandonTClipp I have removed the formatting done by my IDE.

It's now easier to reason about, less code on the diff.

Thanks

@LandonTClipp
Copy link
Collaborator

Thank you!

@LandonTClipp LandonTClipp merged commit 5a3e47a into vektra:master May 28, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants