Comments (8)
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.
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.
I proposed a simple fix in the pull request #12
Let me know if it breaks your plugin undex unix
from prettier-maven-plugin.
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.
All works for me on Windows.
from prettier-maven-plugin.
Great, are you alright running from master or would you prefer I make a new release?
from prettier-maven-plugin.
It would be great if you could release a new version.
from prettier-maven-plugin.
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)
- Fail Maven goal when Prettier commands exit with nonzero code
- Error downloading node: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException HOT 4
- Update default value for nodeVersion
- Way to format this on save HOT 1
- Upgrade prettierJavaVersion default to 1.0.2 HOT 4
- Goal failed when attempting to lint .js files HOT 13
- Outputs violating files when running `check`
- Code formatting issues found, please run prettier-java HOT 3
- Cannot get plugin goals to execute in linked phase HOT 3
- Add prettier-java 1.5.0 support HOT 2
- Support zipped Node executables HOT 2
- Add prettier-java 1.6.0 support HOT 3
- Running on ARM HOT 4
- record keyword breaks build HOT 4
- Downloading from nodejs.org is blocked by firewall HOT 4
- Illegal char <:> at index 4: node:internal/modules/cjs/loader:936 HOT 11
- Version 18 does not reformat code but version 16 does HOT 20
- Plugin hangs forever (0.18, javaPrettierVersion 0.8.3 and above) HOT 7
- Update documentation to have latest prettierJavaVersion present in mvn repository
- Cannot find Module 'bin-prettier.js' HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prettier-maven-plugin.