Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add --no-install flag to devbox update #2508

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

jay-aye-see-kay
Copy link
Contributor

Summary

As part of getting devbox working in renovate, we need to run devbox in renovate's base image (added here containerbase/base#3191). The problem is the way nix is installed (already in that image) it cannot actually install anything. This is because it's a quirky variant of a single user install where all the /nix/* paths are set to custom values.

We can work around this by just having devbox update the lockfile but not actually install anything (which is also a speed win) - but this functionality doesn't seem to available in the devbox cli currently.

This is a potential implementation adding what we need for renovate to upgrade devbox projects. Happy for you to do it another way. The approach we've taken seems like it's misusing the mode variable a little bit.

How was it tested?

Manually tested only; run locally on a macbook, plus in the container linked above.

  • add some packages that are older
  • upgrade them by manually editing devbox.json
  • run devbox update --no-install to update all packages in devbox.lock to latest within ranges devbox.json
  • in the container this failed with cmd.path=/usr/local/bin/nix cmd.stderr="cannot connect to socket at '/tmp/containerbase/cache/nix/state/daemon-socket/socket': No such file or directory" but with this change it works
  • run devbox update nodejs --no-install also works for a single package
  • changes to lockfile seem to be the same as devbox update without the flag, so behaviour of this flag shouldn't surprise anyone

@Lagoja Lagoja merged commit 50fc8d2 into jetify-com:main Feb 12, 2025
29 checks passed
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.

2 participants