Skip to content

Commit

Permalink
Merge pull request #171 from dcoomber/feature/process-env-secrets
Browse files Browse the repository at this point in the history
RFC: Support process.env in Bru script Re #170
  • Loading branch information
helloanoop authored Aug 17, 2023
2 parents ec22fdb + 3ca0107 commit bf5ee7e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/bruno-js/src/bru.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ class Bru {
this._collectionVariables = collectionVariables;
}

getProcessEnv(key) {
return process.env[key];
}

getEnvVar(key) {
return this._envVariables[key];
}
Expand All @@ -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;
Expand All @@ -35,4 +39,4 @@ class Bru {
}
}

module.exports = Bru;
module.exports = Bru;

0 comments on commit bf5ee7e

Please sign in to comment.