Improve error message when an empty var is set

Fixes #962
This commit is contained in:
Mika Andrianarijaona 2023-11-14 16:33:27 +01:00
parent f617504cd6
commit 500e3853a5

View File

@ -58,7 +58,7 @@ class Bru {
setVar(key, value) {
if (!key) {
throw new Error('Key is required');
throw new Error('A variable with an empty name has been created but name is required.');
}
if (envVariableNameRegex.test(key) === false) {