Fix for pip install error when there are no plugins to install

This commit is contained in:
Jamie Curnow 2020-11-06 09:17:52 +10:00
parent 14f84f01b5
commit 3651b9484f

View File

@ -187,12 +187,18 @@ const setupCertbotPlugins = () => {
}
});
if (plugins.length) {
const install_cmd = 'pip3 install ' + plugins.join(' ');
promises.push(utils.exec(install_cmd));
return Promise.all(promises).then(() => {
}
if (promises.length) {
return Promise.all(promises)
.then(() => {
logger.info('Added Certbot plugins ' + plugins.join(', '));
});
}
}
});
};