Giter Site home page Giter Site logo

Comments (8)

jhaber avatar jhaber commented on August 20, 2024

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?

from prettier-maven-plugin.

MSaguer avatar MSaguer commented on August 20, 2024

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

  • Add a new option binPath with default value (/bin) that could be defined in the configuration section.
  • Change the DefaultDiffGenerator to add the specified path to the sh and diff commands

from prettier-maven-plugin.

MSaguer avatar MSaguer commented on August 20, 2024

I proposed a simple fix in the pull request #12
Let me know if it breaks your plugin undex unix

from prettier-maven-plugin.

jhaber avatar jhaber commented on August 20, 2024

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?

from prettier-maven-plugin.

MSaguer avatar MSaguer commented on August 20, 2024

All works for me on Windows.

from prettier-maven-plugin.

jhaber avatar jhaber commented on August 20, 2024

Great, are you alright running from master or would you prefer I make a new release?

from prettier-maven-plugin.

MSaguer avatar MSaguer commented on August 20, 2024

It would be great if you could release a new version.

from prettier-maven-plugin.

jhaber avatar jhaber commented on August 20, 2024

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

from prettier-maven-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.