fix(shell): double quote params - #824
Conversation
|
Thanks for the PR. |
|
Any application that parses the git hooks directory itself without respecting a custom directory set through git config, like GitKraken for example. I suggested respecting the config setting to them earlier today, but until then the many users of GitKraken won't see husky v5 hooks executed as long as they don't add symlinks to the default git hook directory. |
|
Why is the CI failing btw? :0 |
|
I resolved the merge conflicts. @typicode what's your status on this PR? :) |
|
Hmm, I'd prefer to keep the script as it is and not rely on However, if users want to edit their As for the rest LGTM, good catch on the |
| } | ||
|
|
||
| const data = ['#!/bin/sh', '. "$(dirname $0)/_/husky.sh"', '', cmd].join('\n') | ||
| const data = [ |
There was a problem hiding this comment.
| const data = [ | |
| const data = ['#!/bin/sh', '. "$(dirname "$0")/_/husky.sh"', '', cmd].join('\n') |
There was a problem hiding this comment.
Done, except for the additional indentation (?) :)
| @@ -1,4 +1,4 @@ | |||
| . $(dirname $0)/_functions.sh | |||
| . $(dirname "$0")/_functions.sh | |||
There was a problem hiding this comment.
👍 could you change test/config-dir.sh too?
| @@ -1,4 +1,7 @@ | |||
| . $(dirname $0)/_functions.sh | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
I think the shebang can be removed since these scripts are not executable.
There was a problem hiding this comment.
Replaced that with the shellcheck comment.
I don't really see it as a fix for external tools but as broadened functionality for husky even if the "fix" happened to be the reason for this PR. |
I've set
test/default.sh's shebang tobashbecauseecho -eis used in this file.