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-which fails if no .nvmrc present #38

Open
titaniumbones opened this issue Dec 2, 2020 · 0 comments
Open

nvm-which fails if no .nvmrc present #38

titaniumbones opened this issue Dec 2, 2020 · 0 comments

Comments

@titaniumbones
Copy link

Ifhtere's no nvm-which present, then the nvm-which funciton in the docs fails. I was able to fix it with:

  (defun nvm-which ()
    (let ((output (shell-command-to-string "source ~/.nvm/nvm.sh; nvm which")))
      (if (cl-search "Node Version" output)
          (setq output (shell-command-to-string "source ~/.nvm/nvm.sh; nvm which current"))
      (setq output (cadr (split-string output "[\n]+" t))))
    (message output)
    output))
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

No branches or pull requests

1 participant