jhipster-online
jhipster-online copied to clipboard
Fix test failures on windows
The "npm" executable can not be found on windows. Using "npm.cmd" instead of "npm" fixes the tests.
- Added two constants for *nix and windows executables and use the fitting one after running an os detection.
- Tests adjusted to reflect the npm command string change.
Fix #312
Hey @SudharakaP and @atomfrede,
Could you have a look at this? I wanted to look into the sonar issues of the project but stumbled upon this problem. Apparently even the pipeline needs approval from a maintainer to run....
I think the project should build and work on Windows, specially if there is few code to update.
Anyway, this PR is not enought, we should rework all path, using File.separator instead of hard coding /x/y/z
So I would say, let do not merge it for now, with the release 7.2.0
I added this code to my local version to make it work on windows so that I could have a look at the sonar issues. I thought there was a windows pipeline already set up and would trigger on PRs.
I think the project should build and work on Windows, specially if there is few code to update.
Anyway, this PR is not enought, we should rework all path, using File.separator instead of hard coding /x/y/z
So I would say, let do not merge it for now, with the release 7.2.0
Just pushed a new commit where I replaced all the hard coded / linux paths with OS - independent versions. Tests are running under windows.
I also can't test easily - maybe we could test GitHub Actions with Windows, I need to check as I think that's an option.
Then I think this is important to merge (and many thanks to @nomuna for finding & fixing this!). I had the exact same issue on another project, and as I coded both I probably did the same kind of error with the file separators. So it's all my fault!
Oh this code is also in #316 (also from @nomuna ), so I'm closing this one in favour of the other, more complete PR.