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

View file

@ -15,7 +15,8 @@ when defined(gcc) and defined(windows):
import
commands, lexer, condsyms, options, msgs, nversion, nimconf, ropes,
extccomp, strutils, os, osproc, platform, main, parseopt, service
extccomp, strutils, os, osproc, platform, main, parseopt, service,
nodejs
when hasTinyCBackend:
import tccgen
@ -67,7 +68,7 @@ proc handleCmdLine() =
else:
ex = quoteShell(
completeCFilePath(changeFileExt(gProjectFull, "js").prependCurDir))
execExternalProgram("node " & ex & ' ' & commands.arguments)
execExternalProgram(findNodeJs & " " & ex & ' ' & commands.arguments)
else:
var binPath: string
if options.outFile.len > 0: