Skip to content

fix: Escape dollar sign for Windows local setup commands #4728

@festoney8

Description

@festoney8

Steps to Reproduce

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).

# 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, escape sequences begin with the backtick character in double-quoted strings.

Test in PowerShell 5.1:

Image

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

If my findings are correct, I’d glad to create a PR to fix it.

Context

No response

commitlint --version

@commitlint/[email protected]

git --version

v2.53.0

node --version

v24.12.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions