Only chmod if commit-msg hook was fetched successfully
There is no reason to attempt to chmod the commit-msg hook if it
failed to download, so use '&&' instead of ';'.
Some shells, and some shell extensions in particular (f.i. zsh and
oh-my-zsh), have url magic features that automatically attempt to
escape characters in conjunction with urls.
This can cause the current implementation to fail as it would escape
the ';' because it was connected to the curl command argument.
This in turn causes the curl command to fail as it would interpret
the chmod command as another argument to curl.
This resolves both issues by chaining the command instead.
2 files changed