about summary refs log tree commit diff
path: root/third_party/gerrit-queue/.envrc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/gerrit-queue/.envrc')
-rw-r--r--third_party/gerrit-queue/.envrc17
1 files changed, 17 insertions, 0 deletions
diff --git a/third_party/gerrit-queue/.envrc b/third_party/gerrit-queue/.envrc
new file mode 100644
index 000000000000..90cf1bb145ab
--- /dev/null
+++ b/third_party/gerrit-queue/.envrc
@@ -0,0 +1,17 @@
+# This configures [direnv](https://direnv.net/) if installed and enabled to
+# automatically enter the nix-shell defined in `shell.nix`,
+# either by using lorri if available, or nix-shell otherwise.
+
+if type lorri &>/dev/null; then
+    eval "$(lorri direnv)"
+else
+    # fall back to using direnv's builtin nix support (blocking)
+    use nix
+fi
+
+# enable go modules
+export GO111MODULE=on
+unset GOPATH
+
+# Load private overrides
+[[ -f .envrc.private ]] && source_env .envrc.private