mirror of
https://github.com/nvm-sh/nvm.git
synced 2026-11-23 01:12:06 +03:00
`nvm_do_install` decided whether the profile already loads nvm, and its bash completion, by grepping for `/nvm.sh` and `$NVM_DIR/bash_completion` anywhere in it, so a commented-out line, the usual way to disable nvm, counted as present, and reinstalling left the shell with no nvm. Only count a line whose first non-blank character isn't `#`. Fixes #1889. Signed-off-by: Vaibhav Cheruvu <vaibhavsharma.c@gmail.com> Co-authored-by: Vaibhav Cheruvu <vaibhavsharma.c@gmail.com> Co-authored-by: Jordan Harband <ljharb@gmail.com>