Skip to content

Commit a7aed71

Browse files
authored
[envrc] run devbox install to ensure createWrappers is called (#1092)
## Summary Our `.envrc` today calls `shellenv` but that doesn't run `createWrappers`. If the package's binary may change, then the .envrc environment will not get updated. ## How was it tested? in `examples/flakes/php`, I did: 1. `devbox generate direnv` 2. `php -m | grep ds` which prints `ds`. 3. edit `examples/flakes/php/my-php-flake/flake.nix` to remove `ds` extension 4. re-run `php -m | grep ds`. This still prints `ds`. Now, for the test steps: - cd out of the direnv - re-enter the direnv-enabled directory (`examples/flakes/php`) - re-run `php -m | grep ds`. BEFORE: This still prints `ds`. AFTER: no `ds` is printed. Note, in Step 4, ideally we would not print `ds` but for that to happen the direnv would need to check local flake files for changes. Today, it just checks devbox.json for changes. Not addressing in this PR (workaround: `cd` out and back in to the directory)
1 parent afafbe3 commit a7aed71

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

internal/impl/tmpl/envrcContent.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use_devbox() {
22
watch_file devbox.json
33
eval "$(devbox shellenv --init-hook)"
4+
devbox install
45
}
56
use devbox

0 commit comments

Comments
 (0)