You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,14 +90,17 @@ Enter a development shell with pre-commit hooks enabled:
90
90
nix develop
91
91
```
92
92
93
-
Run all hooks sandboxed (no internet access):
93
+
Run all hooks sandboxed:
94
94
95
95
```shell
96
96
nix flake check
97
97
```
98
98
99
-
Some hooks require access to the internet or local filesystem, which is not possible when using `nix flake check`.
100
-
If the hook doesn't expose options to pre-package its impure access or it's too cumbersome to do so, you can run `pre-commit` through `nix develop` instead:
99
+
Keep in mind that `nix flake check` runs in a sandbox.
100
+
It doesn't have access to the internet and cannot modify files.
101
+
This makes it a poor choice for formatting hooks that attempt to fix files automatically, or hooks that cannot easily be packaged to avoid impure access to the internet.
102
+
103
+
A better alternative in such cases is to run `pre-commit` through `nix develop`:
0 commit comments