Commit 50fc8d2
authored
add --no-install flag to
## 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 anyonedevbox update (#2508)1 parent 9ec8286 commit 50fc8d2
File tree
4 files changed
+18
-4
lines changed- internal
- boxcli
- devbox
- devopt
4 files changed
+18
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
52 | 59 | | |
53 | 60 | | |
54 | 61 | | |
| |||
75 | 82 | | |
76 | 83 | | |
77 | 84 | | |
78 | | - | |
| 85 | + | |
| 86 | + | |
79 | 87 | | |
80 | 88 | | |
81 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | | - | |
285 | | - | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
286 | 287 | | |
287 | 288 | | |
288 | 289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
72 | 76 | | |
73 | 77 | | |
74 | 78 | | |
| |||
0 commit comments