From b053c575e48c25631cfa6a6a8ed33b6b93c95ea7 Mon Sep 17 00:00:00 2001 From: Clément Pit-Claudel Date: Fri, 4 May 2018 19:03:25 -0400 Subject: [doc] Search for 'coqtop' in $PATH if COQBIN is unset --- doc/tools/coqrst/repl/coqtop.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc/tools') diff --git a/doc/tools/coqrst/repl/coqtop.py b/doc/tools/coqrst/repl/coqtop.py index efb5cb550..aeadce4c4 100644 --- a/doc/tools/coqrst/repl/coqtop.py +++ b/doc/tools/coqrst/repl/coqtop.py @@ -41,7 +41,9 @@ class CoqTop: the ansicolors module) :param args: Additional arugments to coqtop. """ - self.coqtop_bin = coqtop_bin or os.path.join(os.getenv('COQBIN'),"coqtop") + self.coqtop_bin = coqtop_bin or os.path.join(os.getenv('COQBIN', ""), "coqtop") + if not pexpect.utils.which(self.coqtop_bin): + raise ValueError("coqtop binary not found: '{}'".format(self.coqtop_bin)) self.args = (args or []) + ["-boot", "-color", "on"] * color self.coqtop = None -- cgit v1.2.3