find the nodejs binary

upstream calls it node, debian calls it nodejs. We gotta look for both
of them.
This commit is contained in:
Simon Hafner 2015-01-24 18:02:00 -06:00
commit 2beaa7a2da
3 changed files with 13 additions and 5 deletions

6
lib/core/nodejs.nim Normal file
View file

@ -0,0 +1,6 @@
import os
proc findNodeJs*(): string =
result = findExe("nodejs")
if result == "":
result = findExe("node")