Skip to content

Commit b63af3e

Browse files
committed
tighten tips config docs and tests
1 parent 5da522c commit b63af3e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/env-options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if (process.env.DOTENV_CONFIG_QUIET != null) {
1414
}
1515

1616
if (process.env.DOTENV_CONFIG_TIPS != null) {
17-
// Default is `true`; this only wires through explicit env configuration.
17+
// Only wires through explicit env configuration; defaulting is handled in configDotenv.
1818
options.tips = process.env.DOTENV_CONFIG_TIPS
1919
}
2020

tests/test-config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ const dotenv = require('../lib/main')
99
let logStub
1010

1111
function hasLoggedTip (stub) {
12-
return stub.getCalls().some(call => call.args[0] && call.args[0].includes('-- tip:'))
12+
return stub.getCalls().some(call =>
13+
call.args.some(arg => typeof arg === 'string' && arg.includes('-- tip:'))
14+
)
1315
}
1416

1517
t.beforeEach(() => {

0 commit comments

Comments
 (0)