From bcefc11b01d2a227829f3f79a928ccbcda8d897d Mon Sep 17 00:00:00 2001 From: Kimiyuki Onaka Date: Mon, 8 Jul 2019 10:51:10 +0900 Subject: [PATCH] Add an error message for the case fsautocomplete.exe is not built --- ftplugin/fsharpvim.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ftplugin/fsharpvim.py b/ftplugin/fsharpvim.py index db0335a..8f76f9f 100644 --- a/ftplugin/fsharpvim.py +++ b/ftplugin/fsharpvim.py @@ -66,7 +66,11 @@ def __init__(self, dir, debug = False): else: self.logfile = None - command = ['mono', dir + '/bin/fsautocomplete.exe'] + fsautocomplete = dir + '/bin/fsautocomplete.exe' + if not path.exists(fsautocomplete): + msg = 'fsautocomplete.exe is not found: Did you build it with "make fsautocomplete"?' + raise FileNotFoundError(msg) + command = ['mono', fsautocomplete] opts = { 'stdin': PIPE, 'stdout': PIPE, 'stderr': PIPE, 'universal_newlines': True } hidewin.addopt(opts) try: