Skip to content

feat(install): auto-set global version when installing first version#120

Merged
CalvinAllen merged 1 commit intomainfrom
feature/112-auto-set-global
Dec 12, 2025
Merged

feat(install): auto-set global version when installing first version#120
CalvinAllen merged 1 commit intomainfrom
feature/112-auto-set-global

Conversation

@CalvinAllen
Copy link
Contributor

Summary

  • Automatically sets the installed version as global when no global version is currently configured
  • Applies to both single installs (dtvem install python 3.11.0) and bulk installs (dtvem install)
  • Displays informational message: → Set as global version (first install)
  • Does not change existing global version if one is already set

Before

$ dtvem install ruby 3.4.7
✓ Ruby v3.4.7 installed successfully
$ ruby --version
✗ No Ruby version configured

After

$ dtvem install ruby 3.4.7
✓ Ruby v3.4.7 installed successfully
→ Set as global version (first install)
$ ruby --version
ruby 3.4.7

Test plan

  • All tests pass (including 3 new tests for autoSetGlobalIfNeeded)
  • Lint passes

Fixes #112

When installing the first version of a runtime (no global version
configured), automatically set it as the global version. This improves
the first-time user experience by eliminating the need to manually run
`dtvem global <runtime> <version>` after the first install.

- Adds `autoSetGlobalIfNeeded()` helper function
- Applies to both single installs and bulk installs
- Shows informational message: "Set as global version (first install)"
- Does not change existing global version if one is already set

Fixes #112
@CalvinAllen CalvinAllen merged commit 5e1c138 into main Dec 12, 2025
12 checks passed
@CalvinAllen CalvinAllen deleted the feature/112-auto-set-global branch December 12, 2025 21:44
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.

Auto-set global version when installing first version of a runtime

1 participant