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

$NVM_DIR/default-packages ignores last line #1995

Closed
waldyrious opened this issue Jan 29, 2019 · 3 comments
Closed

$NVM_DIR/default-packages ignores last line #1995

waldyrious opened this issue Jan 29, 2019 · 3 comments
Labels
bugs Oh no, something's broken :-( installing node Issues with installing node/io.js versions. pull request wanted This is a great way to contribute! Help us out :-D

Comments

@waldyrious
Copy link
Contributor

If the $NVM_DIR/default-packages file does not have a blank newline at the end, the contents of the last line are ignored.

  • Operating system and version:
    macOS Mojave v10.14.2

  • Output of nvm --version:
    0.33.11

  • How did you install nvm?
    Homebrew

  • What steps did you perform?

    1. Created $NVM_DIR/default-packages with the following contents:
      yarn
      npm
      typescript
      bunyan
      
    2. Ran nvm install stable
  • What happened?
    Only first three packages in the $NVM_DIR/default-packages were installed

  • What did you expect to happen?
    The last package listed in $NVM_DIR/default-packages (bunyan) should have been installed as well.

After I edited the $NVM_DIR/default-packages file to have a blank newline at the end, the same steps installed all four packages.

@ljharb
Copy link
Member

ljharb commented Jan 29, 2019

While every file should always have a trailing newline, this certainly shouldn't fail. A PR to fix it, with a test, would be appreciated.

@ljharb ljharb added installing node Issues with installing node/io.js versions. bugs Oh no, something's broken :-( pull request wanted This is a great way to contribute! Help us out :-D labels Jan 29, 2019
@ljharb ljharb closed this as completed in d1fc1c8 Feb 2, 2019
@ljharb
Copy link
Member

ljharb commented Feb 2, 2019

hmm, actually i added a test but was unable to reproduce it. I'll reopen.

@ljharb ljharb reopened this Feb 2, 2019
@ljharb ljharb closed this as completed in db19450 Feb 4, 2019
@waldyrious
Copy link
Contributor Author

@ljharb sorry I wasn't able to reply earlier. Thank you for addressing this quickly :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugs Oh no, something's broken :-( installing node Issues with installing node/io.js versions. pull request wanted This is a great way to contribute! Help us out :-D
Projects
None yet
Development

No branches or pull requests

2 participants