Update templates/pre-commit-hook

fix `ruby: no code specified for -e (RuntimeError)` error