Skip to content

Commit

Permalink
docs: Add a note about ENV variables
Browse files Browse the repository at this point in the history
Signed-off-by: Valentin Kiselev <mrexox@evilmartians.com>
  • Loading branch information
mrexox committed Oct 14, 2022
1 parent 61ac528 commit d19009f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/full_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit d19009f

Please sign in to comment.