forked from extern/bruno
Proposal to support process.env in Bru script Re #170
This commit is contained in:
parent
ec22fdb637
commit
3ca0107f1b
@ -5,6 +5,10 @@ class Bru {
|
|||||||
this._collectionVariables = collectionVariables;
|
this._collectionVariables = collectionVariables;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getProcessEnv(key) {
|
||||||
|
return process.env[key];
|
||||||
|
}
|
||||||
|
|
||||||
getEnvVar(key) {
|
getEnvVar(key) {
|
||||||
return this._envVariables[key];
|
return this._envVariables[key];
|
||||||
}
|
}
|
||||||
@ -16,7 +20,7 @@ class Bru {
|
|||||||
|
|
||||||
// gracefully ignore if key is not present in environment
|
// gracefully ignore if key is not present in environment
|
||||||
if(!this._envVariables.hasOwnProperty(key)) {
|
if(!this._envVariables.hasOwnProperty(key)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._envVariables[key] = value;
|
this._envVariables[key] = value;
|
||||||
@ -35,4 +39,4 @@ class Bru {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = Bru;
|
module.exports = Bru;
|
||||||
|
Loading…
Reference in New Issue
Block a user