Skip to content

Commit

Permalink
feat: use /usr/bin/env sh instead of direct path of sh (#1051)
Browse files Browse the repository at this point in the history
  • Loading branch information
skhaz committed Feb 17, 2022
1 parent 082a55c commit 81b2e2e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .husky/commit-msg
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit "$1"
2 changes: 1 addition & 1 deletion .husky/pre-commit
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"

npm test
2 changes: 1 addition & 1 deletion docs/README.md
Expand Up @@ -399,7 +399,7 @@ fi
2. Source it in in places where Yarn is used to run commands:

```shell
#!/bin/sh
#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"

Expand Down
2 changes: 1 addition & 1 deletion husky.sh
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh
if [ -z "$husky_skip_init" ]; then
debug () {
if [ "$HUSKY_DEBUG" = "1" ]; then
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Expand Up @@ -63,7 +63,7 @@ export function set(file: string, cmd: string): void {

fs.writeFileSync(
file,
`#!/bin/sh
`#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"
${cmd}
Expand Down

0 comments on commit 81b2e2e

Please sign in to comment.