Skip to content

Conversation

@deining
Copy link
Contributor

@deining deining commented Jun 28, 2023

This PR follows up on #10846. It adds validation for the config option: if the value given for config is not a directory, a warning is emitted.

With this patch applied:

git clone --single-branch -b hugo-github-issue-10846 https://github.com/jmooring/hugo-testing hugo-github-issue-10846
cd hugo-github-issue-10846
npm ci
hugo_0.115.dev
Start building sites …
hugo v0.115.0-DEV-8ff4385708a6c19e6f7fb2cb9394eb0cb9c3f2fa windows/amd64 BuildDate=2023-06-28T14:51:41Z

WARN  postcss config "foo/bar.config.js" must be a directory

                   | EN
-------------------+-----
  Pages            |  1
  Paginator pages  |  0
  Non-page files   |  0
  Static files     |  0
  Processed images |  0
  Aliases          |  0
  Sitemaps         |  0
  Cleaned          |  0

Total in 3217 ms

Note the line in the middle emitting a warning.

@github-actions
Copy link

This PR has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
Please check https://github.com/gohugoio/hugo/blob/master/CONTRIBUTING.md#code-contribution and verify that this code contribution fits with the description. If yes, tell is in a comment.
This PR will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

@github-actions github-actions bot added the Stale label Jan 28, 2025
@deining deining force-pushed the validate-postcss-config branch from d54edd8 to 41fbca2 Compare January 28, 2025 20:51
@deining deining force-pushed the validate-postcss-config branch from 41fbca2 to 2c36796 Compare January 28, 2025 20:54
@github-actions github-actions bot removed the Stale label Jan 29, 2025
@deining
Copy link
Contributor Author

deining commented Jan 29, 2025

In order to prevent this PR from getting stale, I rebased my PR and resolved all existing merge conflicts.

This PR is now up to date again, I proved this by running and testing it on the corresponding branch of the test repo again:

Start building sites … 
hugo v0.143.0-DEV-2c367960252771eb19afc4b848e939f452947d2b+extended linux/amd64 BuildDate=2025-01-28T20:53:32Z

WARN  postcss config "foo/bar.config.js" must be a directory

@bep: Friendly ping, I would appreciate if this is a small, but IMHO useful contribution could be merged. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant