getRequiredEnvParams must be non-empty

This commit is contained in:
Robin Neatherway 2020-06-26 11:44:17 +01:00
parent 17548064f9
commit bb9ed79f3d
6 changed files with 17 additions and 4 deletions

2
lib/util.js generated
View file

@ -41,7 +41,7 @@ exports.should_abort = should_abort;
*/
function getRequiredEnvParam(paramName) {
const value = process.env[paramName];
if (value === undefined) {
if (value === undefined || value.length === 0) {
throw new Error(paramName + ' environment variable must be set');
}
core.debug(paramName + '=' + value);