mirror of
https://github.com/usebruno/bruno.git
synced 2025-01-03 12:39:34 +01:00
Merge pull request #963 from mikaoelitiana/962-empty-vars
Improve error message when an empty var is set
This commit is contained in:
commit
4abb4009e6
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user