diff --git a/docs/full_guide.md b/docs/full_guide.md index 04b95051..a6b6488f 100644 --- a/docs/full_guide.md +++ b/docs/full_guide.md @@ -508,6 +508,21 @@ source_dir: ".lefthook" source_dir_local: ".lefthook-local" ``` +## Custom preset ENV variables + +Lefthook allows you to set ENV variables for the commands and scripts. This is helpful when you use lefthook on different OSes and need to pass ENV vars to your executables. + +```yml +# lefthook.yml + +pre-commit: + commands: + test: + run: bundle exec rspec + env: + RAILS_ENV: test +``` + ## Manage verbosity You can manage the verbosity using the `skip_output` config.