summary refs log tree commit diff stats
path: root/compiler/nimrod.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/nimrod.nim')
-rw-r--r--compiler/nimrod.nim8
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/nimrod.nim b/compiler/nimrod.nim
index 38d440ade..efe3d83bf 100644
--- a/compiler/nimrod.nim
+++ b/compiler/nimrod.nim
@@ -61,8 +61,12 @@ proc handleCmdLine() =
           tccgen.run()
       if optRun in gGlobalOptions:
         if gCmd == cmdCompileToJS:
-          var ex = quoteShell(
-            completeCFilePath(changeFileExt(gProjectFull, "js").prependCurDir))
+          var ex: string
+          if options.outFile.len > 0:
+            ex = options.outFile.prependCurDir.quoteShell
+          else:
+            ex = quoteShell(
+              completeCFilePath(changeFileExt(gProjectFull, "js").prependCurDir))
           execExternalProgram("node " & ex & ' ' & service.arguments)
         else:
           var binPath: string