diff options
author | Clément Pit-Claudel <clement.pitclaudel@live.com> | 2018-05-04 19:03:25 -0400 |
---|---|---|
committer | Clément Pit-Claudel <clement.pitclaudel@live.com> | 2018-05-15 12:05:44 -0400 |
commit | b053c575e48c25631cfa6a6a8ed33b6b93c95ea7 (patch) | |
tree | 351944345410cd3d0b3da80ba09fc275ce930e0b /doc/tools/coqrst | |
parent | d5bb8a4ae2f509532ecfb4a53bb91c64d992c2e6 (diff) |
[doc] Search for 'coqtop' in $PATH if COQBIN is unset
Diffstat (limited to 'doc/tools/coqrst')
-rw-r--r-- | doc/tools/coqrst/repl/coqtop.py | 4 |
1 files changed, 3 insertions, 1 deletions
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 |