ChristophP / elm-i18next

https://package.elm-lang.org/packages/ChristophP/elm-i18next/latest
BSD 3-Clause "New" or "Revised" License
67 stars 13 forks source link

Use `fs.realpathSync` instead as realpath is not on all CLIs. #2

Closed mccrodp closed 7 years ago

mccrodp commented 7 years ago

I'm on Mac OS X and I don't have realpath, it's probably safer to assume someone has which and use that?

I also tried readlink which seems to be on Mac, but that gave error too!

ChristophP commented 7 years ago

Woot woot the first PR :-). So I get the point that realpath might not be available everywhere. However your solution with which will reference the globally installed elm-make, but the whole point of providing the --compiler option is to use the locally installed one. Without that option the globally installed compiler will be used anyway. So maybe you could maybe swap out which elm-make with something like this

node -r fs -p "fs.realpathSync('node_modules/.bin/elm-make')"

. What do you think about that?

(Btw realpath is in the GNU coreutils and you can get it with brew install coreutils if you want)

mccrodp commented 7 years ago

Thanks, wasn't sure what the goal was, but using local elm-make makes sense. Suggestion works and PR updated.

Good to know about realpath in GNU coreutils for future also in case I need it.

ChristophP commented 7 years ago

Awesome, I am merging it. Thank you for contributing.