-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better behavior when no configuration file is found #502
Comments
I would just print a notice:
That way we're not guessing (that could bite us), but we're making it clear that their settings aren't being picked up. Could also be good to notify where the config came from:
|
This should already be the current behavior:
Do you think this is enough? If so, I can close this issue. |
Do we have docs on how config works (e.g. do defaults get inherited? is that consistent across .toml/.yml/Netlify dev?)? if so, I'd love to see those linked from the notice. If not, maybe that's a new issue? |
@jlengstorf the values in the config file take precedence, if required values are missing they are inherited from the site settings from the UI |
Netlify dev doesn't read json/yml yet. It will once this is merged in a day or so netlify/cli#616 |
@DavidWells I don't think that's universally true. For example setting any config in the Either way, it would be good to link people to the docs where we explain this so they can learn for themselves how config is managed. |
This sounds like a dev error in the CLI. There is a-lot of confusion around the |
@jlengstorf @DavidWells Should this issue be closed? |
Personally, I wouldn't close this until there are links to docs in the warnings and/or an issue is open to create clearer docs around defaults and config composition. |
This issue has been automatically marked as stale because it has not had activity in 1 year. It will be closed in 14 days if no further activity occurs. Thanks! |
This issue was closed because it had no activity for over 1 year. |
Follow-up on #497.
Using a configuration file is optional. As such, the configuration defaults to an empty object when no configuration file is found. No exceptions are thrown.
Please note:
--config
path was explicitly specified, we do throw an error if it cannot be foundHowever it might be possible that no configuration files might have been found due to wrong user configuration. The only way I can think of would be when the configuration file was saved under a wrong filename. We could use Levenshtein distance or similar approach to try to guess when this happens, in order to print an error message.
The text was updated successfully, but these errors were encountered: