Skip to content

Commit cdbb73a

Browse files
authored
Prevent direnv errors when not using nix (OpenAPITools#16875)
Right now, if a developer uses `direnv` but does not use `nix`, an error is reported whenever changing into the OpenAPI generator directory: ```console $ cd ~/oss/forks/openapi-generator direnv: loading ~/oss/forks/openapi-generator/.envrc direnv: using flake environment:1270: nix: command not found ``` This uses the `has()` function to check for `nix` to *conditionally* run the `use_flake` function.
1 parent ae590c4 commit cdbb73a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.envrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
use flake
1+
has nix && use flake

0 commit comments

Comments
 (0)