Closed MSaguer closed 4 years ago
Sorry about that, I was aware that diff generation wouldn't work on Windows and tried to document this: https://github.com/HubSpot/prettier-maven-plugin#configuration
We currently pipe the prettier output to the diff
command and redirect the output to a file, so my hunch was that fixing the path wouldn't actually fix the issue on Windows where you don't have a diff
command at all. I'm not sure the best way to support this on Windows, do you have any thoughts?
Oh! I read this page many times and I missed the relevant part.
Under git bash window, both sh and diff commands are available under /usr/bin. That's why I think that replacing "/bin/sh" by "sh" would be enough for me. But removing the absolute path would force the user to add this folder in its path and it may introduce a regression.
Here is a possible solution that let the user configure its env as he wants
I proposed a simple fix in the pull request #12 Let me know if it breaks your plugin undex unix
We run this plugin off of master within HubSpot so #11 and #12 have already been picked up and are working fine within our environment. Can you confirm that things are now working for you on Windows?
All works for me on Windows.
Great, are you alright running from master or would you prefer I make a new release?
It would be great if you could release a new version.
Sorry for the long delay, just pushed the new version to Maven Central: https://github.com/HubSpot/prettier-maven-plugin/releases/tag/prettier-maven-plugin-0.8
Prettier-maven-plugin version 0.7.0
When generateDiff option is set to true, the generate diff crashes with the following error message
Using git bash window, sh is defined under "/usr/bin/sh instead of /bin/sh as defined in DefaultDiffGenerator.
What about adding an optional maven option to define the sh path? I could do it if you want.