Skip to content

docs: fixed shell substitutions in local setup guide #2512

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

Merged

Conversation

dmoonfire
Copy link
Contributor

@dmoonfire dmoonfire commented Mar 19, 2021

Fixed a shell substitution in the local setup guide where $1 was being resolved instead of being put into the Husky hook.

Description

Changed the " in the example to ' to avoid shell substitutions.

Motivation and Context

As reported in #2511, the $1 was not being put into the hook properly (as the second example gave). This brings the two in line with each other.

Usage examples

This is for setting up Husky with the package.

$ yarn husky add .husky/commit-msg 'yarn commitlint --edit $1'
$ cat .husky/commit-msg
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn commitlint --edit $1
$

How Has This Been Tested?

Manually tested it in Bash.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

I didn't update tests since this was documentation.

@escapedcat escapedcat merged commit 10a7447 into conventional-changelog:master Mar 19, 2021
@escapedcat
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants