Skip to content

Commit

Permalink
feat: resolving missing process.env in v5 (#267)
Browse files Browse the repository at this point in the history
* feat: resolving missing process.env in v5

* chore: resolving tests

Co-authored-by: Matt Steele <hello@mrsteele.dev>
  • Loading branch information
2 people authored and tobias-trozowski committed Nov 12, 2020
1 parent fdeeb18 commit 5531124
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ class Dotenv {
return obj
}, {})

// fix in case of missing
formatted['process.env'] = '{}'

return formatted
}

Expand Down
2 changes: 2 additions & 0 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ const buildExpectation = (obj) => {
return all
}, {})

raw['process.env'] = '{}'

return raw
}

Expand Down

0 comments on commit 5531124

Please sign in to comment.