Merge pull request #171 from dcoomber/feature/process-env-secrets

RFC: Support process.env in Bru script Re #170
This commit is contained in:
Anoop M D 2023-08-17 23:00:41 +05:30 committed by GitHub
commit bf5ee7e409
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,10 @@ class Bru {
this._collectionVariables = collectionVariables;
}
getProcessEnv(key) {
return process.env[key];
}
getEnvVar(key) {
return this._envVariables[key];
}
@ -16,7 +20,7 @@ class Bru {
// gracefully ignore if key is not present in environment
if(!this._envVariables.hasOwnProperty(key)) {
return;
return;
}
this._envVariables[key] = value;
@ -35,4 +39,4 @@ class Bru {
}
}
module.exports = Bru;
module.exports = Bru;