Skip to content

Commit 9e85678

Browse files
authored
[devbox.Open] drop ensureNixInstalled function call (#1453)
## Summary Problem: Commands like `devbox version` are installing nix. Cause: By inserting a `debug.PrintStack()` one can [see](https://gist.github.com/savil/0fff37124abae3d1c0088404c05a73cc) that `devbox.Open` is invoked for `devbox version` from a few places. In the latest 0.5.12 release, we added a call to `ensureNixInstalled` in `devbox.Open`. Hence even though we don't set `PreRunE: ensureNixInstalled` in the command, the nix install is triggered. The original motivation for adding this call in `devbox.Open` was that `nix` is pretty widely used in the `Devbox` library, and we should add `ensureNixInstalled` as a check. ## How was it tested? compiles will rely on tests to pass
1 parent 4f014e2 commit 9e85678

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

internal/impl/devbox.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,6 @@ func Open(opts *devopt.Opts) (*Devbox, error) {
130130
)
131131
}
132132

133-
if err := nix.EnsureNixInstalled(box.writer, func() *bool { return nil } /*withDaemonFunc*/); err != nil {
134-
return nil, err
135-
}
136-
137133
return box, nil
138134
}
139135

0 commit comments

Comments
 (0)