File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ function _resolveHome (envPath) {
190190
191191function _configVault ( options ) {
192192 const debug = Boolean ( options && options . debug )
193- const quiet = options && 'quiet' in options ? options . quiet : true
193+ const quiet = Boolean ( options && options . quiet )
194194
195195 if ( debug || ! quiet ) {
196196 _log ( 'Loading env from encrypted .env.vault' )
@@ -212,7 +212,7 @@ function configDotenv (options) {
212212 const dotenvPath = path . resolve ( process . cwd ( ) , '.env' )
213213 let encoding = 'utf8'
214214 const debug = Boolean ( options && options . debug )
215- const quiet = options && 'quiet' in options ? options . quiet : true
215+ const quiet = Boolean ( options && options . quiet )
216216
217217 if ( options && options . encoding ) {
218218 encoding = options . encoding
Original file line number Diff line number Diff line change @@ -34,13 +34,13 @@ t.test('logs when no path is set', ct => {
3434 ct . ok ( logStub . called )
3535} )
3636
37- t . test ( 'does not log by default' , ct => {
37+ t . test ( 'does log by default' , ct => {
3838 ct . plan ( 1 )
3939
4040 logStub = sinon . stub ( console , 'log' )
4141
4242 dotenv . config ( { path : testPath } )
43- ct . ok ( logStub . notCalled )
43+ ct . ok ( logStub . called )
4444} )
4545
4646t . test ( 'does not log if quiet flag passed true' , ct => {
@@ -79,13 +79,13 @@ t.test('logs if debug set', ct => {
7979 ct . ok ( logStub . called )
8080} )
8181
82- t . test ( 'does not log when testPath calls to .env.vault directly (interpret what the user meant)' , ct => {
82+ t . test ( 'does log when testPath calls to .env.vault directly (interpret what the user meant)' , ct => {
8383 ct . plan ( 1 )
8484
8585 logStub = sinon . stub ( console , 'log' )
8686
8787 dotenv . config ( { path : `${ testPath } .vault` } )
88- ct . ok ( logStub . notCalled )
88+ ct . ok ( logStub . called )
8989} )
9090
9191t . test ( 'logs when testPath calls to .env.vault directly (interpret what the user meant) and debug true' , ct => {
Original file line number Diff line number Diff line change @@ -261,7 +261,7 @@ t.test('deals with file:// path', ct => {
261261 ct . equal ( process . env . BASIC , undefined )
262262 ct . equal ( env . error . message , "ENOENT: no such file or directory, open 'file:///tests/.env'" )
263263
264- ct . ok ( logStub . notCalled )
264+ ct . ok ( logStub . called )
265265
266266 logStub . restore ( )
267267
You can’t perform that action at this time.
0 commit comments