When the `nvm` function is called by a script which itself uses a variable
named `i`, `nvm` clobbers the caller's variable. This happens even if the
caller has declared its variable as local.
See note 1 on https://tldp.org/LDP/abs/html/localvar.html#FTN.AEN18568
This command allows users to replace default colors with their own custom colors.
- top-level commands modified: alias, ls, ls-remote
- helper functions added: nvm_echo_with_colors, nvm_err_with_colors,
nvm_set_colors, nvm_get_colors, nvm_print_color_code
- functions modified: nvm_print_formatted_alias, nvm_print_versions, nvm_print_alias_path (implicitly), nvm_print_default_alias (implicitly), nvm_list_aliases (implicitly)
We added tests and info on using this command to the README!
Co-authored-by: Dena Burd <29719099+gitburd@users.noreply.github.com>
Co-authored-by: Naomi Quinones <52065567+naomiquinones@users.noreply.github.com>
locale-gen command seems missing since uncertain point for a while:
```
Step 15/33 : RUN locale-gen en_US.UTF-8
---> Running in fae073c89c01
/bin/bash: locale-gen: command not found
The command '/bin/bash -o pipefail -c locale-gen en_US.UTF-8' returned
a non-zero code: 127
```
This patch should fix the Docker image build
The workaround came from this GitHub issue comment:
https://github.com/koalaman/shellcheck/issues/1053#issuecomment-357816927
Looks like the problem doesn't exist any more:
```
.
.
.
Step 14/33 : RUN shellcheck -V
---> Running in 4b7a718c1cbf
ShellCheck - shell script analysis tool
version: 0.7.0
license: GNU General Public License, version 3
website: https://www.shellcheck.net
.
.
.
```
The workaround should be removed so that the Dockerfile will be easier
to be understand and read.
Fixed a bug where --silent mode was failing for nvm use I ran a test
that just ran ```nvm use node --silent``` that I wrote by myself.
Unfortunately I noticed a bug where it still prints out some messages in
different cases. This pull request is to fix that bug. * Added in an argument
called ***quiet*** to the nvm_rc_version() function at *line 339* * Printed
anything inside the nvm_rc_version() only in the scenario where quiet mode is
off * Ran the nvm_rc_version() function in quiet mode only if silent mode is
on in the "use" command of nvm at *line 2990* * Ran *nvm_echo* and *nvm_err*
inside the "use" command of nvm only in the scenario where silent mode is off
(There were 4 scenarios where this was forgotten) * Edited the ```nvm
deactivate``` command to include a silent mode * Changed the help page to
include the --silent option for ```nvm deactivate``` * Added in aliases for
the --silent flag in ```nvm deactivate``` and ```nvm use``` * Used silent
mode inside the ```nvm use``` when running ```nvm deactivate``` inside it and
silent mode is on A test was attached in the 'test/slow/nvm use' directory.
It is named *Running "nvm use node --silent" doesn't print anything*. It runs
```nvm use node --silent and checks``` and succeeds if the OUTPUT matches the
EXPECTED_OUTPUT which is *null* or *''*. When the test was run locally, it
still ouputed results if someone deleted some contents of the *.nvm/* folder.
This output was given from the ```nvm deactivate command```. This was the
reason that the ```nvm deactivate``` was edited to include silent mode.