Skip to content

Commit

Permalink
feat: use NO_HUSKY_HOOKS as environment
Browse files Browse the repository at this point in the history
  • Loading branch information
pplmx committed Oct 1, 2024
1 parent f678ff8 commit f956189
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ For a full list, see the [Git documentation](https://git-scm.com/docs/githooks).
To skip hook installation:

```sh
CARGO_HUSKY_DONT_INSTALL_HOOKS=1 cargo build
NO_HUSKY_HOOKS=1 cargo build
```

## Best Practices
Expand Down
4 changes: 2 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ const SHEBANGS: [&str; 8] = [
];

fn main() -> Result<()> {
if env::var_os("CARGO_HUSKY_DONT_INSTALL_HOOKS").is_some() {
println!("CARGO_HUSKY_DONT_INSTALL_HOOKS is set, skipping hook installation");
if env::var_os("NO_HUSKY_HOOKS").is_some() {
println!("NO_HUSKY_HOOKS is set, skipping hook installation");
return Ok(());
}

Expand Down

0 comments on commit f956189

Please sign in to comment.