core
core copied to clipboard
fix: verify commit msg.
When I try to make vue core a submodule of my project:
git submodule add https://github.com/vuejs/core.git
do something and git commit:
git commit -am "docs: add comments."
it will throw error:
➜ core git:(heads/v3.4.21) ✗ git commit -am "docs: add comments."
✔ Preparing lint-staged...
✔ Running tasks for staged files...
✔ Applying modifications from tasks...
✔ Cleaning up temporary files...
> @3.4.21 check /Volumes/work_data/Web_data/Web_project/code/Vue3/source/core
> tsc --incremental --noEmit
node:fs:453
return binding.readFileUtf8(path, stringToFlags(options.flag));
^
Error: ENOTDIR: not a directory, open '/Volumes/work_data/Web_data/Web_project/code/Vue3/source/core/.git/COMMIT_EDITMSG'
at readFileSync (node:fs:453:20)
at file:///Volumes/work_data/Web_data/Web_project/code/Vue3/source/core/scripts/verify-commit.js:7:13
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:34:7)
at async handleMainPromise (node:internal/modules/run_main:113:12) {
errno: -20,
code: 'ENOTDIR',
syscall: 'open',
path: '/Volumes/work_data/Web_data/Web_project/code/Vue3/source/core/.git/COMMIT_EDITMSG'
}