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

docs: husky add .husky/commit-msg docs fix #3113

Merged
merged 2 commits into from Apr 23, 2022
Merged

docs: husky add .husky/commit-msg docs fix #3113

merged 2 commits into from Apr 23, 2022

Conversation

sdzialowski-godaddy
Copy link
Contributor

Executing


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

doesn't seem to produce desired .husky/commit-msg file content

#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no -- commitlint --edit $1

instead it produces

#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no -- commitlint --edit 

because $1 is interpolated, adding slash doesn't seem to help, hence suggested fix (fix is bit ugly I admit, up to you guys to accept it or fixing it your way)

Description

Motivation and Context

Usage examples

// commitlint.config.js
module.exports = {};
echo "your commit message here" | commitlint # fails/passes

How Has This Been Tested?

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.

@escapedcat
Copy link
Member

escapedcat commented Apr 8, 2022

Thanks! On which environment did this happen?
Just wondering why nobody complained so far if this doesn't work.

@fzn0x did the current changes I believe. Maybe fzn0x has some feedback.
@sd-godaddy would you mind running yarn format to fix the failing pipeline?

sdzialowski-godaddy and others added 2 commits April 22, 2022 18:04
Executing

```

npx husky add .husky/commit-msg 'npx --no -- commitlint --edit $1'
yarn husky add .husky/commit-msg 'yarn commitlint --edit $1'

```

doesn't seem to produce desired .husky/commit-msg file content

```
. "$(dirname "$0")/_/husky.sh"

npx --no -- commitlint --edit $1
```

instead it produces

```
. "$(dirname "$0")/_/husky.sh"

npx --no -- commitlint --edit
```

because $1 is interpolated, adding slash doesn't seem to help, hence suggested fix (fix is bit ugly I admit, up to you guys to accept it or fixing it your way)
@escapedcat escapedcat changed the title (yarn|npx) husky add .husky/commit-msg docs fix docs: husky add .husky/commit-msg docs fix Apr 22, 2022
@escapedcat
Copy link
Member

Thanks @sd-godaddy !

@escapedcat escapedcat merged commit bf47d1c into conventional-changelog:master Apr 23, 2022
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.

None yet

2 participants