ITADN

fix: Escape dollar sign for Windows local setup commands

#4728Openfestoney8 创建于 2026-04-22
bug
F
festoney8commented
### Steps to Reproduce ```bash 1. Use Windows PowerShell and any package manager in [npm, yarn, pnpm, bun, deno] 2. Follow the local setup guide, run command for Windows users. ``` ### Current Behavior This issue is related to PR #4559, which added a backtick to the commands for various package managers (npm, yarn, pnpm, bun, deno). ```shell # Before PR echo "pnpm dlx commitlint --edit `$1" > .husky/commit-msg # After PR echo "pnpm dlx commitlint --edit `$1`" > .husky/commit-msg ``` This change appears to make the command invalid. In [powershell doc](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_special_characters?view=powershell-5.1), escape sequences begin with the backtick character in double-quoted strings. **Test in PowerShell 5.1:** <img width="1523" height="561" alt="Image" src="https://github.com/user-attachments/assets/add0f04d-9832-4a3e-a5ca-e2637a8f0850" /> ### Expected Behavior Fix the command for all package manangers, and please indicate the windows command is only for Powershell user in doc. ### Affected packages - [ ] cli - [ ] core - [ ] prompt - [ ] config-angular ### Possible Solution _No response_ ### Context _No response_ ### commitlint --version @commitlint/cli@20.5.0 ### git --version v2.53.0 ### node --version v24.12.0
0 条评论