1
0
mirror of https://github.com/NginxProxyManager/nginx-proxy-manager.git synced 2025-07-28 08:02:00 +03:00

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,11 +187,17 @@ const setupCertbotPlugins = () => {
}
});
const install_cmd = 'pip3 install ' + plugins.join(' ');
promises.push(utils.exec(install_cmd));
return Promise.all(promises).then(() => {
logger.info('Added Certbot plugins ' + plugins.join(', '));
});
if (plugins.length) {
const install_cmd = 'pip3 install ' + plugins.join(' ');
promises.push(utils.exec(install_cmd));
}
if (promises.length) {
return Promise.all(promises)
.then(() => {
logger.info('Added Certbot plugins ' + plugins.join(', '));
});
}
}
});
};