Skip to content
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

Do not attempt to build if there is no config file #6426

Merged
merged 1 commit into from
Oct 21, 2019

Conversation

ollien
Copy link
Contributor

@ollien ollien commented Oct 15, 2019

As of now, if one attempts to run hugo in a directory without a config file, it will fail.

$ hugo
Error: Unable to locate config file or config directory. Perhaps you need to create a new site.
       Run `hugo help new` for details.

This addresses #5896. It is worth noting that if the directory has a go.mod file, building will still continue, as it is still considered a config file. I'm not 100% on how to deal with this, as it seems that we still do want these to be considered config files for Hugo's module system. It's a small edge case, but this will catch most cases.

@bep bep merged commit e6aa6ed into gohugoio:master Oct 21, 2019
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants