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

Learn how to rename a node after installation #284

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Commits on Jul 3, 2017

  1. Learn how to rename a node after installation

    The rename_node function is part of node-build that way the build
    definitions simply need to define their after_install_package function
    to invoke rename_node.
    
    The function accepts a specific name as the new name, but defaults the
    name to the actual response from `node --version`.
    
    PREFIX_PATH must be updated after the move such that the rest of
    node-build knows about the new location.
    
    After moving the installed node, a symlink is created at the original
    location pointing to the new location. This allows end users to set
    their selected node using the same name as the build definition.
    Further, this "hack" allows any other plugins that hook into
    after-install to continue operating unchanged. Without the symlink,
    `PREFIX` and `NODENV_VERSION` would be incorrect for all after-install
    hooks. However, as they now refer to an existing directory (symlink),
    the hooks will operate on the newly installed node correctly.
    
    TODO: handle the "new name" already existing
    jasonkarns committed Jul 3, 2017
    Configuration menu
    Copy the full SHA
    d36636f View commit details
    Browse the repository at this point in the history
  2. Better function name

    jasonkarns committed Jul 3, 2017
    Configuration menu
    Copy the full SHA
    8413e5b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fb7393a View commit details
    Browse the repository at this point in the history