diff options
author | Guillaume Boudreau <guillaume@pommepause.com> | 2017-01-18 01:54:14 +0300 |
---|---|---|
committer | Brad Warren <bmw@users.noreply.github.com> | 2017-01-18 01:54:14 +0300 |
commit | a5101d73a0a6e6fb12215d7efed3a4db666260df (patch) | |
tree | 4bd88215468fb28456dafdbc4b2e55659af838bf /letsencrypt-auto-source/letsencrypt-auto | |
parent | 2797a0377d0382b2c8aad0f611537c3f89f06c64 (diff) |
certbot-auto re-installs virtualenv when plugin is causing issues (#4035)
When certbot-auto cannot find the currently installed version, output the error to the end-user, instead of not showing anything, and re-installing the virtualenv.
Fixes #4034
Diffstat (limited to 'letsencrypt-auto-source/letsencrypt-auto')
-rwxr-xr-x | letsencrypt-auto-source/letsencrypt-auto | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/letsencrypt-auto-source/letsencrypt-auto b/letsencrypt-auto-source/letsencrypt-auto index 464781a49..7210f6a3d 100755 --- a/letsencrypt-auto-source/letsencrypt-auto +++ b/letsencrypt-auto-source/letsencrypt-auto @@ -609,6 +609,11 @@ if [ "$1" = "--le-auto-phase2" ]; then # --version output ran through grep due to python-cryptography DeprecationWarnings # grep for both certbot and letsencrypt until certbot and shim packages have been released INSTALLED_VERSION=$("$VENV_BIN/letsencrypt" --version 2>&1 | grep "^certbot\|^letsencrypt" | cut -d " " -f 2) + if [ -z "$INSTALLED_VERSION" ]; then + echo "Error: couldn't get currently installed version for $VENV_BIN/letsencrypt: " 1>&2 + "$VENV_BIN/letsencrypt" --version + exit 1 + fi else INSTALLED_VERSION="none" fi |