summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--compiler/main.nim7
-rw-r--r--compiler/nodejs.nim2
2 files changed, 8 insertions, 1 deletions
diff --git a/compiler/main.nim b/compiler/main.nim
index d37d26478..ff870a14a 100644
--- a/compiler/main.nim
+++ b/compiler/main.nim
@@ -71,6 +71,13 @@ proc commandGenDepend(graph: ModuleGraph) =
   let project = graph.config.projectFull
   writeDepsFile(graph)
   generateDot(graph, project)
+
+  # dot in graphivz tool kit is required
+  let graphvizDotPath = findExe("dot")
+  if graphvizDotPath.len == 0:
+    quit("gendepend: Graphviz's tool dot is required," &
+    "see https://graphviz.org/download for downloading")
+
   execExternalProgram(graph.config, "dot -Tpng -o" &
       changeFileExt(project, "png").string &
       ' ' & changeFileExt(project, "dot").string)
diff --git a/compiler/nodejs.nim b/compiler/nodejs.nim
index 283643e8d..c1feb196a 100644
--- a/compiler/nodejs.nim
+++ b/compiler/nodejs.nim
@@ -7,4 +7,4 @@ proc findNodeJs*(): string {.inline.} =
     result = findExe("node")
   if result.len == 0:
     echo "Please install NodeJS first, see https://nodejs.org/en/download"
-    raise newException(IOError, "NodeJS not found in PATH: " & result)
+    raise newException(IOError, "NodeJS not found in PATH")