Skip to content

Commit 8455220

Browse files
committed
Prevent cosmiconfig from reading from process.argv
Fixes postcss#148
1 parent 2322cb8 commit 8455220

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ Promise.resolve()
119119
function rc(ctx, path) {
120120
if (argv.use) return Promise.resolve()
121121

122-
return postcssrc(ctx, path)
122+
// Set argv: false to keep cosmiconfig from attempting to read the --config
123+
// flag from process.argv
124+
return postcssrc(ctx, path, { argv: false })
123125
.then(rc => {
124126
if (rc.options.from || rc.options.to) {
125127
error(

0 commit comments

Comments
 (0)