Closed gcurtis closed 2 months ago
To check if nix daemon is running, Devbox runs:
nix store info --json --store daemon
This fails on older versions of Nix for a couple reasons:
nix store info
nix store ping
--json
Check for both of these versions when constructing the nix store command so it works for Nix versions 2.12 - 2.21+.
nix store
Also add a nix.VersionInfo.AtLeast method and constants to make checking for supported major Nix versions easier.
nix.VersionInfo.AtLeast
Tested by running the nix store commands on all supported Nix versions.
This pull request was deployed and Sentry observed the following issues:
go.jetpack.io/devbox/internal/nix in runNixVersion
Did you find this useful? React with a 👍 or 👎
To check if nix daemon is running, Devbox runs:
This fails on older versions of Nix for a couple reasons:
nix store info
wasnix store ping
.--json
flag wasn't supported.Check for both of these versions when constructing the
nix store
command so it works for Nix versions 2.12 - 2.21+.Also add a
nix.VersionInfo.AtLeast
method and constants to make checking for supported major Nix versions easier.Tested by running the
nix store
commands on all supported Nix versions.