Skip to content

Commit 8c6d45c

Browse files
committed
Merge branch 'release/2.1.0'
2 parents 54f9218 + c890088 commit 8c6d45c

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 2.1.0 - 2018.08.07
4+
- Expose entire process.env to command called with CLI
5+
36
## 2.0.2 - 2018.04.16
47
- Fix markdown header (thanks @vvo)
58
- Update package dependencies (thanks @gregswindle)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,13 @@ npm install -g dotenv-extended
102102
Now call your shell scripts through `dotenv-extended` (this uses the defaults):
103103

104104
```
105-
dotenv-extended myshellscript.sh --whatever-flags-my-script-takes
105+
dotenv-extended ./myshellscript.sh --whatever-flags-my-script-takes
106106
```
107107

108108
Configure `dotenv-extended` by passing any of the dotenv-extended options before your command. Preceed each option with two dashes `--`:
109109

110110
```
111-
dotenv-extended --path=/path/to/.env --defaults=/path/to/.env.defaults --errorOnMissing=true myshellscript.sh --whatever-flags-my-script-takes
111+
dotenv-extended --path=/path/to/.env --defaults=/path/to/.env.defaults --errorOnMissing=true ./myshellscript.sh --whatever-flags-my-script-takes
112112
```
113113

114114
The following are the flags you can pass to the `dotenv-extended` cli with their default values. these options detailed later in this document:

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dotenv-extended",
3-
"version": "2.0.2",
3+
"version": "2.1.0",
44
"description": "A module for loading .env files and optionally loading defaults and a schema for validating all values are present.",
55
"repository": "[email protected]:keithmorris/node-dotenv-extended.git",
66
"main": "lib/index.js",
@@ -10,7 +10,8 @@
1010
"test": "gulp unittest",
1111
"coveralls": "cat ./coverage/lcov.info | coveralls",
1212
"lint": "gulp lint",
13-
"prepublish": "gulp build"
13+
"prepublish": "npm run build",
14+
"build": "gulp build"
1415
},
1516
"keywords": [
1617
"dotenv",

src/bin/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ import {spawn} from 'cross-spawn';
1313
function loadAndExecute(args) {
1414
const [dotEnvConfig, command, commandArgs] = parseCommand(args);
1515
if (command) {
16+
config(dotEnvConfig); // mutates process.env
1617
const proc = spawn(command, commandArgs, {
1718
stdio: 'inherit',
1819
shell: true,
19-
env: config(dotEnvConfig),
20+
env: process.env,
2021
});
2122

2223
process.on('SIGTERM', () => proc.kill('SIGTERM'));

0 commit comments

Comments
 (0)