Skip to content

Conversation

@smorimoto
Copy link

@smorimoto smorimoto commented Oct 12, 2025

Summary

Add support for the $nvm_enable_corepack variable that automatically enables Corepack when installing Node.js versions.

Changes

  • Feature: Add $nvm_enable_corepack variable support
    • When set, automatically runs corepack enable during Node.js installation
    • Follows the same pattern as existing variables like $nvm_default_packages
  • Documentation: Update help message and README.md with variable description
  • Tests: Add test case to verify the functionality

Usage

# Enable automatic Corepack enablement for all new Node.js installations
set --universal nvm_enable_corepack 1

# Install Node.js (Corepack will be automatically enabled)
nvm install latest

Rationale

This provides a convenient way to ensure Corepack is consistently enabled across Node.js installations, similar to how $nvm_default_packages works for npm packages.

@ljharb
Copy link

ljharb commented Oct 12, 2025

Why? Corepack isn’t supposed to be enabled by default ever, nor is it even installed in node 25+.

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.

2 participants