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

Add --alias and --default to Install #2274

Merged
merged 1 commit into from
Aug 2, 2020
Merged

Conversation

gitburd
Copy link
Contributor

@gitburd gitburd commented Jul 31, 2020

Resolves #1867

This is a follow up the work in PR #1929
I could not push to @kaltepeter 's remote so I have made a new PR.

Issue :

It'd be nice if I could combine
✗ nvm install 8 && nvm alias default 8
into:
✗ nvm install --default 8

Seems like a reasonable request - we could also add --alias=foo (and have --default be a shortcut for --alias=default) to cover the generic case.

Tests:

ran with:
--alias=* version
--alias=* no-version
--default --alias=* version

Does not return err
--alias=* version --default

For: `nvm install 8.12.0` after install:

--alias=8 is equivalent to `nvm alias 8 8.12.0`
--default is equivalent to `nvm alias default 8.12.0`

Co-authored-by: Kayla Altepeter <[email protected]>
Co-authored-by: Dena Burd <[email protected]>
Co-authored-by: Jordan Harband <[email protected]>
@gitburd gitburd changed the title Install alias Add --alias and --default to Install Jul 31, 2020
@gitburd gitburd force-pushed the install-alias2 branch 2 times, most recently from 210767f to ffaf577 Compare August 1, 2020 03:42
@ljharb
Copy link
Member

ljharb commented Aug 1, 2020

@gitburd thanks - in the future, if you paste a link to your branch, I can pull in the changes for you. Creating multiple PRs leaves orphaned refs unless I manually keep them both in sync.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

install LTS is also failing; not sure why

test/installation_node/install with --alias Outdated Show resolved Hide resolved
test/installation_node/install with --default Outdated Show resolved Hide resolved
@ljharb
Copy link
Member

ljharb commented Aug 2, 2020

k, fixed the two new tests; the LTS test was failing because "${ALIAS}" will fail when the -u option is set, and ALIAS doesn't exist. "${ALIAS-}" avoids that.

@ljharb ljharb added feature requests I want a new feature in nvm! installing node Issues with installing node/io.js versions. labels Aug 2, 2020
@ljharb ljharb merged commit a5aec10 into nvm-sh:master Aug 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature requests I want a new feature in nvm! installing node Issues with installing node/io.js versions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request: Add a --default option to install
3 participants