Skip to content

Conversation

mikeland73
Copy link
Contributor

@mikeland73 mikeland73 commented Mar 26, 2023

Summary

Fixes #829

run and shell always call generate but using shell --print-env and shellenv don't. This means that sometimes the .devbox directory might be out of date (e.g. when we turned on flakes, not everyone has flake.nix file). Since not all workflows involve shell and run, some users never update it. For performance reasons, we only update if the devbox version doesn't match whatever version created the .devbox dir.

This change may not be sufficient to fix all cases, but it fixes the attached issue.

How was it tested?

rm .devbox/gen/flake/flake.nix
devbox shellenv > /dev/null
rm .devbox/gen/flake/flake.nix
devbox shell --print-env > /dev/nul
``

no error (previously this gave me same error as issue)

@mikeland73 mikeland73 requested review from gcurtis and savil March 26, 2023 21:53
@mikeland73 mikeland73 merged commit 172452d into main Mar 27, 2023
@mikeland73 mikeland73 deleted the landau/generate-on-shellenv branch March 27, 2023 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: project initialized with older devbox has error on init
2 participants