Skip to content

fix: avoid set_env panic on Windows doctor - #237

Merged
justjavac merged 1 commit into
mainfrom
fix-windows-doctor-env-222
Jun 29, 2026
Merged

fix: avoid set_env panic on Windows doctor#237
justjavac merged 1 commit into
mainfrom
fix-windows-doctor-env-222

Conversation

@justjavac

Copy link
Copy Markdown
Owner

Summary

  • Avoid set_env on Windows in dvm doctor, since it can panic while touching PowerShell profile files
  • Use PowerShell/.NET user environment APIs on Windows for DVM_DIR and Path
  • Move the dvm bin path to the front of user and process PATH without duplicating entries
  • Keep the existing set_env behavior for non-Windows platforms

Fixes #222

Tests

  • cargo test
  • Added a Windows unit test for PATH de-duplication and front insertion

Note: I did not run dvm doctor directly because it writes persistent user environment variables.

@justjavac
justjavac merged commit d140e3c into main Jun 29, 2026
16 of 18 checks passed
@justjavac
justjavac deleted the fix-windows-doctor-env-222 branch June 29, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error installing on powershell - File not found.

1 participant