mirror of
https://github.com/modelstudioai/cli.git
synced 2026-09-14 19:49:23 +08:00
fix(tooling): stop interpolating filenames into staged check
Passing staged filenames per-file puts repository paths into the argv of the vp check node process. When an endpoint security agent matches process argv by substring, the whole process is SIGKILLed and pre-commit can never finish. Use the function form so the command runs without filenames: one whole-repo check, wider coverage than per-file, and independent of any path.
This commit is contained in:
+5
-1
@@ -36,7 +36,11 @@ export default defineConfig({
|
||||
hookTimeout: 60_000,
|
||||
},
|
||||
staged: {
|
||||
"*.{js,mjs,cjs,ts,mts,cts,jsx,tsx,json,yaml,yml,md}": "vp check --fix",
|
||||
// 用函数形式返回命令:不把匹配到的文件名插值进 argv,改为跑一次全量检查。
|
||||
// 逐文件传参会让 `vp check` 的 node 进程 argv 携带仓库内的文件名,
|
||||
// 命中终端安全软件按 argv 子串匹配的进程管控规则时整个进程被 SIGKILL,
|
||||
// 导致 pre-commit 无法完成。全量检查覆盖面更广,也不依赖文件名。
|
||||
"*.{js,mjs,cjs,ts,mts,cts,jsx,tsx,json,yaml,yml,md}": () => "vp check --fix",
|
||||
},
|
||||
lint: {
|
||||
options: { typeAware: true, typeCheck: true },
|
||||
|
||||
Reference in New Issue
Block a user