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:
Ruslan Kuprieiev
2019-09-09 00:26:04 +03:00
committed by GitHub
parent 2ee9da61f0
commit 2d2ac67e50
+1 -1
View File
@@ -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)
)