postcss-cli icon indicating copy to clipboard operation
postcss-cli copied to clipboard

Fails silently when config not found

Open kkmuffme opened this issue 2 years ago • 1 comments

When the config file isn't found, it silently fails and does nothing: https://github.com/postcss/postcss-cli/commit/b5a0c4f99b682dcf4b7401a6a5ed6398ed2ce93d

Is there a specific reason why this error is ignored @RyanZim ?

Would you accept a PR that changes this behavior that if a config path is passed (but no config found), it will still throw an error?

kkmuffme avatar Jan 01 '24 21:01 kkmuffme

It's ignored since a config file isn't required (e.g. you could pass plugins inline with -u). However, it would make sense to throw if the --config option is being used, but no config file is found; PR welcome. Fair warning, this will be a breaking change, which I'd prefer to bundle with other breaking upgrades, so it probably won't be released right away.

RyanZim avatar Jan 03 '24 00:01 RyanZim