Skip to content

Commit 22d04d6

Browse files
committed
fix(scripts): 修复git diff命令中文件名包含特殊字符时的问题
在获取暂存Markdown文件列表时,为git命令添加`-c core.quotePath=false`参数,确保包含特殊字符(如中文、空格等)的文件名能被正确解析和处理。
1 parent 200d1b6 commit 22d04d6

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

scripts/run-rumdl-staged.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ function runCapture(command, args) {
3434
*/
3535
function getStagedMarkdownFiles() {
3636
const result = runCapture('git', [
37+
'-c',
38+
'core.quotePath=false',
3739
'diff',
3840
'--cached',
3941
'--name-only',

0 commit comments

Comments
 (0)