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

internal/nix: fix version comparison for prerelease versions #2131

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

gcurtis
Copy link
Collaborator

@gcurtis gcurtis commented Jun 6, 2024

Nix prerelease version strings aren't valid semvers. An example is 2.23.0pre20240526_7de033d6. This breaks the Nix minimum version check that Devbox performs at startup.

Special-case prerelease versions by coercing them to valid semvers when performing a comparison. For example, 2.23.0pre20240526_7de033d6 becomes 2.23.0-pre.20240526+7de033d6.

Fixes #2128.

Nix prerelease version strings aren't valid semvers. An example is
`2.23.0pre20240526_7de033d6`. This breaks the Nix minimum version check
that Devbox performs at startup.

Special-case prerelease versions by coercing them to valid semvers when
performing a comparison. For example, `2.23.0pre20240526_7de033d6`
becomes `2.23.0-pre.20240526+7de033d6`.

Fixes #2128.
@gcurtis gcurtis requested review from mikeland73 and savil June 6, 2024 22:03
@gcurtis gcurtis merged commit 64d3fd5 into main Jun 7, 2024
24 checks passed
@gcurtis gcurtis deleted the gcurtis/version-bug branch June 7, 2024 18:32
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.

devbox shell cannot start (error in the nix version detection)
2 participants