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

enhance(build): warn only once about missing BLOG_ROOT #10269

Merged
merged 3 commits into from
Mar 28, 2024

Conversation

awxiaoxian2020
Copy link
Contributor

@awxiaoxian2020 awxiaoxian2020 commented Jan 5, 2024

Summary

Fixes #10262.

Problem

Warn 'BLOG_ROOT' not set in .env file multiple times in console.

Solution

Move warning to top level.


Screenshots

Before

console1

After

console2


How did you test this change?

run yarn dev.

@awxiaoxian2020 awxiaoxian2020 marked this pull request as ready for review January 5, 2024 10:43
@awxiaoxian2020 awxiaoxian2020 requested a review from a team as a code owner January 5, 2024 10:43
@github-actions github-actions bot added the idle label Feb 4, 2024
Copy link
Contributor

@fiji-flo fiji-flo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot. Some minor changes because findPostFileBySlug is still used and it must return null. So it's cleaner if we check for BLOG_ROOT in there.

If you add my suggested changes this is great and we'll approve.

build/utils.ts Show resolved Hide resolved
build/spas.ts Outdated Show resolved Hide resolved
build/spas.ts Outdated Show resolved Hide resolved
@github-actions github-actions bot removed the idle label Feb 12, 2024
awxiaoxian2020 and others added 2 commits February 17, 2024 12:51
Co-authored-by: Florian Dieminger <me@fiji-flo.de>
@awxiaoxian2020
Copy link
Contributor Author

@fiji-flo PTAL :)

Copy link
Contributor

@caugner caugner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTU (@argl @fiji-flo @caugner), thanks! 🎉

@caugner caugner merged commit ad94d8a into mdn:main Mar 28, 2024
9 checks passed
@caugner caugner changed the title fix(build): avoid warning multiple times enhance(build): warn only once about missing BLOG_ROOT Mar 28, 2024
@awxiaoxian2020 awxiaoxian2020 deleted the warn branch March 28, 2024 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'BLOG_ROOT' not set in .env file shouldn't be in loop when build site
3 participants