fxpio / foxy

A fast, reliable, and secure NPM/Yarn/pnpm bridge for Composer
https://foxypkg.com
MIT License
173 stars 21 forks source link

Replace "/" -> "\" if windows in 'manager-bin' path #13

Closed MekDrop closed 6 years ago

MekDrop commented 6 years ago

Foxy has config option "manager-bin" and it's possible to define it in composer.json. If you use it it works good, if you are using package only on windows or *nix, however if you want to use it between OS'es, it's possible that you will have some problem. If you define your path like in windows f.e. vendor\bin\npm on linux this would not work. And linux path like vendor/bin/npm would rise similar problem in windows.

This pull request, if detects that composer runs on windows replaces all / with \ in path. So, now it possible to write path in linux style that could work also on windows.

This can be useful when using foxy with such composer plugin like nodejs-installer that installs node and npm in vendor folder.