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

#!/bin/sh shebang in hooks #869

Closed
jdbruijn opened this issue Feb 13, 2021 · 3 comments
Closed

#!/bin/sh shebang in hooks #869

jdbruijn opened this issue Feb 13, 2021 · 3 comments
Labels

Comments

@jdbruijn
Copy link

Context
Please describe your issue and provide some context:

  • Terminal or GUI client (PowerShell, Git Bash, GitHub Desktop, ...)
    Not particular interesting, but on Linux with zsh.
  • If applicable, content of the failing hook
    n/a
  • If possible, minimal steps to reproduce the issue
    n/a

First of all, I'm no expert at shell scripts. As the hooks are shell scripts, shouldn't they start with a shebang line? I'd think #!/bin/sh, just like is used in the generated husky.sh script. The scripts are executed either way, but I was thinking the scripts should have a shebang line.

If they indeed need a #!/bin/sh shebang line I'd be happy to PR with updated examples in the docs.

@typicode
Copy link
Owner

You're right. In the docs, I'm using # ... instead of the full hook script to focus on the command rather than the parts generated by husky add .... But husky add ... should create a hook with the shebang , a small husky script and the command provided.

Maybe I'll modify that. Thanks for the feedback.

@jdbruijn
Copy link
Author

I understand where you're point of view as well. I created my scripts manually so didn't see what husky add ... would be creating. I personally don't think adding the shebang makes the examples that much longer or harder to understand.

I understand both sides, so feel free to close this issue if you won't be updating the docs for this. If I can do anything for this, let me know!

@stale
Copy link

stale bot commented Jul 2, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 2, 2021
@stale stale bot closed this as completed Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants