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

fix: make hook template compatible with shells without source command #458

Merged
merged 1 commit into from
Mar 23, 2023
Merged

fix: make hook template compatible with shells without source command #458

merged 1 commit into from
Mar 23, 2023

Conversation

mdesantis
Copy link
Contributor

@mdesantis mdesantis commented Mar 23, 2023

⚡ Summary

On Linux Ubuntu 22.04, /bin/sh doesn't support source command, so if you run this template you get an error like the following one:

> git commit -m wip
.git/hooks/pre-commit: 8: source: not found

Replacing source with . fixed it. Also, dot seems to be the POSIX standard.

☑️ Checklist

  • Check locally
  • Add tests

@mdesantis mdesantis changed the title Make template compatible with shells without source command Make hook template compatible with shells without source command Mar 23, 2023
On Linux Ubuntu 22.04, `/bin/sh` doesn't support `source` command, so if you run this template you get an error like the following one:

```
> git commit -m wip
.git/hooks/pre-commit: 8: source: not found
```

Replacing `source` with `.` fixed it.
@mrexox mrexox changed the title Make hook template compatible with shells without source command fix: make hook template compatible with shells without source command Mar 23, 2023
@mrexox mrexox merged commit 4d2695b into evilmartians:master Mar 23, 2023
@mrexox
Copy link
Member

mrexox commented Mar 23, 2023

Hey! Check this out in 1.3.8 release 🚀

@mdesantis mdesantis deleted the mdesantis-patch-1 branch March 23, 2023 15:48
@mdesantis
Copy link
Contributor Author

mdesantis commented Mar 23, 2023

Just tested, works great ;) thanks!

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

Successfully merging this pull request may close these issues.

2 participants