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) {
190
190
191
191
function _configVault ( options ) {
192
192
const debug = Boolean ( options && options . debug )
193
- const quiet = options && 'quiet' in options ? options . quiet : true
193
+ const quiet = Boolean ( options && options . quiet )
194
194
195
195
if ( debug || ! quiet ) {
196
196
_log ( 'Loading env from encrypted .env.vault' )
@@ -212,7 +212,7 @@ function configDotenv (options) {
212
212
const dotenvPath = path . resolve ( process . cwd ( ) , '.env' )
213
213
let encoding = 'utf8'
214
214
const debug = Boolean ( options && options . debug )
215
- const quiet = options && 'quiet' in options ? options . quiet : true
215
+ const quiet = Boolean ( options && options . quiet )
216
216
217
217
if ( options && options . encoding ) {
218
218
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 => {
34
34
ct . ok ( logStub . called )
35
35
} )
36
36
37
- t . test ( 'does not log by default' , ct => {
37
+ t . test ( 'does log by default' , ct => {
38
38
ct . plan ( 1 )
39
39
40
40
logStub = sinon . stub ( console , 'log' )
41
41
42
42
dotenv . config ( { path : testPath } )
43
- ct . ok ( logStub . notCalled )
43
+ ct . ok ( logStub . called )
44
44
} )
45
45
46
46
t . test ( 'does not log if quiet flag passed true' , ct => {
@@ -79,13 +79,13 @@ t.test('logs if debug set', ct => {
79
79
ct . ok ( logStub . called )
80
80
} )
81
81
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 => {
83
83
ct . plan ( 1 )
84
84
85
85
logStub = sinon . stub ( console , 'log' )
86
86
87
87
dotenv . config ( { path : `${ testPath } .vault` } )
88
- ct . ok ( logStub . notCalled )
88
+ ct . ok ( logStub . called )
89
89
} )
90
90
91
91
t . 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 => {
261
261
ct . equal ( process . env . BASIC , undefined )
262
262
ct . equal ( env . error . message , "ENOENT: no such file or directory, open 'file:///tests/.env'" )
263
263
264
- ct . ok ( logStub . notCalled )
264
+ ct . ok ( logStub . called )
265
265
266
266
logStub . restore ( )
267
267
You can’t perform that action at this time.
0 commit comments