File tree Expand file tree Collapse file tree 4 files changed +10
-5
lines changed
Expand file tree Collapse file tree 4 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 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 )
Original file line number Diff line number Diff line change @@ -102,13 +102,13 @@ npm install -g dotenv-extended
102102Now 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
108108Configure ` 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
114114The following are the flags you can pass to the ` dotenv-extended ` cli with their default values. these options detailed later in this document:
Original file line number Diff line number Diff line change 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" ,
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" ,
Original file line number Diff line number Diff line change @@ -13,10 +13,11 @@ import {spawn} from 'cross-spawn';
1313function 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' ) ) ;
You can’t perform that action at this time.
0 commit comments