You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cache.save omits directories with no 'leaf' files (that is any directory or multiple levels of directory which have not files at the bottom (empty dirs and dir trees)). This results in pre-commit failing for some pre-commit hooks (like markdownlint-cli, stylelint, eslint, cspell, and more).
The omitting of empty directories should be an optional feature.
Steps to reproduce
Create a .pre-commit-config.yaml file in the root of a Netlify site's Git repository which uses one or more of the mentioned pre-commit hooks.
Verify your pre-commit configuration works
Use a build plugin with uses cache.save(\<$XDG_CACHE_HOME>/pre-commit)
Remove \<$XDG_CACHE_HOME>/pre-commit
Use a build plugin which uses cache.restore(\<$XDG_CACHE_HOME>/pre-commit)
Attempt to use your previously working pre-commit configuration
It will fail with errors.
It only affects Node.js pre-commit hooks that I have found, to date.
CLI command and flags
N/A
Configuration
##############################
Netlify configuration file
##############################
# List of Build plugins
[[plugins]]
# Use the current plugin in builds for testing and debugging.# Local path to the plugin.package = "."# Plugin configuration# [plugins.inputs]# foo = "bar"
[build]
command = "bash ./scripts/netlify_build.sh"publish = "public"
[build. Environment]
GO_VERSION = "1.20.4"HUGO_ENABLEGITINFO = "true"HUGO_ENV = "production"HUGO_VERSION = "0.111.3"NODE_VERSION = "v16.20.0"TZ="America/Toronto"
Describe the bug
cache.save
omits directories with no 'leaf' files (that is any directory or multiple levels of directory which have not files at the bottom (empty dirs and dir trees)). This results in pre-commit failing for somepre-commit
hooks (likemarkdownlint-cli
,stylelint
,eslint
,cspell
, and more).The omitting of empty directories should be an optional feature.
Steps to reproduce
.pre-commit-config.yaml
file in the root of a Netlify site's Git repository which uses one or more of the mentioned pre-commit hooks.pre-commit
configuration workscache.save(\<$XDG_CACHE_HOME>/pre-commit)
\<$XDG_CACHE_HOME>/pre-commit
cache.restore(\<$XDG_CACHE_HOME>/pre-commit)
pre-commit
configurationIt only affects Node.js pre-commit hooks that I have found, to date.
CLI command and flags
N/A
Configuration
##############################
Netlify configuration file
##############################
Example pre-commit hook: https://github.com/danielfdickinson/netlify-plugin-pre-commit/tree/e9f92c60dc02f1f38e3a8cfbd897d02b9ba56326
CLI output
Environment
Note that this also occurs on the Netlify web app (i.e. on Focal Fossa instance hosted by Netlify for doing deploys).
The text was updated successfully, but these errors were encountered: