Merge pull request #963 from mikaoelitiana/962-empty-vars

Improve error message when an empty var is set
This commit is contained in:
Anoop M D 2023-11-18 09:01:55 +05:30 committed by GitHub
commit 4abb4009e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,7 +58,7 @@ class Bru {
setVar(key, value) { setVar(key, value) {
if (!key) { 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) { if (envVariableNameRegex.test(key) === false) {