mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-12 23:10:11 +01:00
hooks: make syntax compatible with bare sh
`==` is not part of the posix and not all shells (e.g. dash) support it, making hooks break.
This commit is contained in:
@@ -241,7 +241,7 @@ class Git(Base):
|
||||
|
||||
def _install_hook(self, name, cmd):
|
||||
command = (
|
||||
'[ "$3" == "0" ]'
|
||||
'[ "$3" = "0" ]'
|
||||
' || [ -z "$(git ls-files .dvc)" ]'
|
||||
" || exec dvc {}".format(cmd)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user