Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$1 cound't be written correctly #3134

Closed
zzzgit opened this issue Apr 22, 2022 · 5 comments
Closed

$1 cound't be written correctly #3134

zzzgit opened this issue Apr 22, 2022 · 5 comments

Comments

@zzzgit
Copy link

zzzgit commented Apr 22, 2022

# Add hook
npx husky add .husky/commit-msg 'npx --no -- commitlint --edit "$1"'
# Sometimes above command doesn't work in some command interpreters
# You can try other commands below to write npx --no -- commitlint --edit $1
# in the commit-msg file.
npx husky add .husky/commit-msg \"npx --no -- commitlint --edit '$1'\"
# or
npx husky add .husky/commit-msg "npx --no -- commitlint --edit $1"

# or
yarn husky add .husky/commit-msg 'yarn commitlint --edit $1'

I tried all these commands on macOS. $1 will always be replaced by an empty string.

Finally, I wrote it by myself, hahaa.

@escapedcat
Copy link
Member

Thanks for reporting. This was mentioned here as well: #3113

@escapedcat
Copy link
Member

I guess we can leave this open till i.e. the PR is merged

@escapedcat escapedcat reopened this Apr 22, 2022
@escapedcat
Copy link
Member

@zzzgit
Copy link
Author

zzzgit commented Apr 22, 2022

Yes, it works.

@escapedcat
Copy link
Member

Thanks, will merge then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants