-
Notifications
You must be signed in to change notification settings - Fork 870
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 #967 : Add pnpm executable to PATH #1045
Conversation
How will this work on Windows (which doesn't have symlinks, I think)? |
pnpm work with symlinks to a global store. So it should be work on Windows too. |
Hi @eirslett , According to their documentation, pnpm does'nt use symlinks neither, but junctions, that we cannot use here because we're trying to create a link to a file and not to a directory. https://pnpm.io/faq#does-it-work-on-windows The others options to make this works on windows are :
Or : => As all of these are non-trivial, I propose to simply add a check before creating the symlink to ensure that we're running on a non-windows platform. I updated my code accordingly . |
👍 However, this project has an integration test that tries to run pnpm. As far as I can see, that integration test is now passing. Is it possible to create a reproduction of this bug/issue (a failing integration test), to show that the problem has indeed been fixed with this patch? |
Sure, I can have a look. Should I include the new test in this merge request or in a new one ? |
@JulesAaelio I merged your PR with the failing integration test. As you can see here: https://github.com/eirslett/frontend-maven-plugin/actions/runs/3169669688/jobs/5161739948 it looks like the integration test is still failing on Ubuntu? Can you have a look? If you rebase your pull request branch, the integration test should be included in there, so it's easier to check whether the test passes or fails. |
When no pnpm or pnpm.cmd are available, create a symlink to node_modules/pnpm/bin/pnpm.cjs
6318eb8
to
c8f2ec3
Compare
Hi @eirslett => I bumped the versions and the tests are now behaving as expected : |
👍 So how do we make the test pass on Windows then? |
f426247
to
50909c5
Compare
50909c5
to
48c5168
Compare
As I said on my previous comment, making it work on windows is a bit more complicated and I don't feel like digging into it. |
Ok, let's merge it anyways! And hopefully somebody on Windows will fix it if they need it. |
Summary
Fix the issue described in #967
The solution I propose is to create a symlink to
node_modules/pnpm/bin/pnpm.cjs
when no pnpm or pnpm.cmd is available.Tests and Documentation
I tested using this dummy project : https://github.com/JulesAaelio/test-frontend-maven-plugin