From eac513d73b204c6f31c807b53851f4d65ece0497 Mon Sep 17 00:00:00 2001 From: Peter Eckersley Date: Mon, 19 Oct 2015 17:21:47 -0700 Subject: [PATCH] Offer more specific help if no installer is present Fixes: #896 --- letsencrypt/cli.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/letsencrypt/cli.py b/letsencrypt/cli.py index 4368db7f7..5f4f8102a 100644 --- a/letsencrypt/cli.py +++ b/letsencrypt/cli.py @@ -334,12 +334,21 @@ def diagnose_configurator_problem(cfg_type, requested, plugins): if requested: if requested not in plugins: msg = "The requested {0} plugin does not appear to be installed".format(requested) - raise PluginSelectionError, msg else: msg = ("The {0} plugin is not working; there may be problems with " "your existing configuration").format(requested) - raise PluginSelectionError, msg - raise PluginSelectionError, "{0} could not be determined or is not installed".format(cfg_type) + elif cfg_type == "installer": + if os.path.exists("/etc/debian_version"): + # Debian... installers are at least possible + msg = ('No installers seem to be present and working on your system; ' + 'fix that or try running letsencrypt with the "auth" command') + else: + # XXX update this logic as we make progress on #788 and nginx support + msg = ('No installers are available on your OS yet; try running ' + '"letsencrypt-auto auth" to get a cert you can install manually') + else: + msg = "{0} could not be determined or is not installed".format(cfg_type) + raise PluginSelectionError, msg def choose_configurator_plugins(args, config, plugins, verb):