Skip to content

Commit a1a2df3

Browse files
authored
[direnv] update envrcs in projects (#915)
## Summary Ran `devbox generate direnv --force` in these directories. Note, now that we ensure packages are installed during this step for one or two of these it took a short while, but better than a long pause when `cd`-ing into the directory. ## How was it tested? didn't test
1 parent 04dc4ff commit a1a2df3

File tree

6 files changed

+17
-7
lines changed

6 files changed

+17
-7
lines changed

.envrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use_devbox() {
55
watch_file devbox.json
66
if [ -f .devbox/gen/flake/flake.nix ]; then
77
DEVBOX_SHELL_ENABLED_BACKUP=$DEVBOX_SHELL_ENABLED
8-
eval $(devbox shellenv --init-hook)
8+
eval "$(devbox shellenv --init-hook)"
99
export DEVBOX_SHELL_ENABLED=$DEVBOX_SHELL_ENABLED_BACKUP
1010
fi
1111
}
Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1+
# Automatically sets up your devbox environment whenever you cd into this
2+
# directory via our direnv integration:
3+
14
use_devbox() {
25
watch_file devbox.json
3-
eval $(devbox shell --print-env)
6+
if [ -f .devbox/gen/flake/flake.nix ]; then
7+
DEVBOX_SHELL_ENABLED_BACKUP=$DEVBOX_SHELL_ENABLED
8+
eval "$(devbox shellenv --init-hook)"
9+
export DEVBOX_SHELL_ENABLED=$DEVBOX_SHELL_ENABLED_BACKUP
10+
fi
411
}
5-
use devbox
12+
use devbox
13+
14+
# check out https://www.jetpack.io/devbox/docs/ide_configuration/direnv/
15+
# for more details

examples/data_science/jupyter/.envrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use_devbox() {
55
watch_file devbox.json
66
if [ -f .devbox/gen/flake/flake.nix ]; then
77
DEVBOX_SHELL_ENABLED_BACKUP=$DEVBOX_SHELL_ENABLED
8-
eval $(devbox shell --print-env)
8+
eval "$(devbox shellenv --init-hook)"
99
export DEVBOX_SHELL_ENABLED=$DEVBOX_SHELL_ENABLED_BACKUP
1010
fi
1111
}

examples/development/ruby/.envrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use_devbox() {
55
watch_file devbox.json
66
if [ -f .devbox/gen/flake/flake.nix ]; then
77
DEVBOX_SHELL_ENABLED_BACKUP=$DEVBOX_SHELL_ENABLED
8-
eval $(devbox shell --print-env)
8+
eval "$(devbox shellenv --init-hook)"
99
export DEVBOX_SHELL_ENABLED=$DEVBOX_SHELL_ENABLED_BACKUP
1010
fi
1111
}

examples/servers/nginx/.envrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use_devbox() {
55
watch_file devbox.json
66
if [ -f .devbox/gen/flake/flake.nix ]; then
77
DEVBOX_SHELL_ENABLED_BACKUP=$DEVBOX_SHELL_ENABLED
8-
eval $(devbox shell --print-env)
8+
eval "$(devbox shellenv --init-hook)"
99
export DEVBOX_SHELL_ENABLED=$DEVBOX_SHELL_ENABLED_BACKUP
1010
fi
1111
}

examples/stacks/jekyll/.envrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use_devbox() {
55
watch_file devbox.json
66
if [ -f .devbox/gen/flake/flake.nix ]; then
77
DEVBOX_SHELL_ENABLED_BACKUP=$DEVBOX_SHELL_ENABLED
8-
eval $(devbox shell --print-env)
8+
eval "$(devbox shellenv --init-hook)"
99
export DEVBOX_SHELL_ENABLED=$DEVBOX_SHELL_ENABLED_BACKUP
1010
fi
1111
}

0 commit comments

Comments
 (0)