You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling __rvm_unload in a script severely munges the environment, namely PATH, which makes further commands in the script impossible
Steps to reproduce
rvm get master
also occurs in 1.29.9 — regression from 1.29.8
create script:
#!/bin/bash
source ~/.rvm/scripts/rvm
echo "---- BEFORE ----"
echo $PATH
echo "---- BEFORE ----"
__rvm_unload
echo "---- AFTER ----"
echo $PATH
echo "--- AFTER ----"
env
run script
Expected behavior
Current path displayed between 'BEFORE'
Same path, minus the ruby-specific entries, displayed between 'AFTER'
Output using 1.29.8:
---- BEFORE ----
/home/user/.rvm/gems/ruby-2.6.3/bin:/home/user/.rvm/gems/ruby-2.6.3@global/bin:/home/user/.rvm/rubies/ruby-2.6.3/bin:/home/user/bin:.:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/user/.rvm/bin
---- BEFORE ----
---- AFTER ----
/home/user/bin:.:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
--- AFTER ----
LC_ALL=C.UTF-8
[...]
Actual behavior
$ ./test.sh
---- BEFORE ----
/home/user/.rvm/gems/ruby-2.6.3/bin:/home/user/.rvm/gems/ruby-2.6.3@global/bin:/home/user/.rvm/rubies/ruby-2.6.3/bin:/home/user/bin:.:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/user/.rvm/bin
---- BEFORE ----
/home/user/.rvm/scripts/functions/support: line 277: awk: command not found
/home/user/.rvm/scripts/functions/env: line 187: sort: command not found
/home/user/.rvm/scripts/functions/env: line 187: cat: command not found
/home/user/.rvm/scripts/functions/support: line 277: awk: command not found
/home/user/.rvm/scripts/functions/support: line 277: awk: command not found
/home/user/.rvm/scripts/functions/support: line 260: grep: command not found
/home/user/.rvm/scripts/functions/env: line 187: sort: command not found
/home/user/.rvm/scripts/functions/env: line 187: cat: command not found
/home/user/.rvm/scripts/functions/env: line 234: sort: command not found
/home/user/.rvm/scripts/functions/support: line 277: awk: command not found
/home/user/.rvm/scripts/functions/support: line 260: grep: command not found
/home/user/.rvm/scripts/functions/env: line 187: sort: command not found
/home/user/.rvm/scripts/functions/env: line 187: cat: command not found
---- AFTER ----
.
--- AFTER ----
./test.sh: line 12: env: command not found
Description
Calling __rvm_unload in a script severely munges the environment, namely PATH, which makes further commands in the script impossible
Steps to reproduce
rvm get master
also occurs in 1.29.9 — regression from 1.29.8
Expected behavior
Current path displayed between 'BEFORE'
Same path, minus the ruby-specific entries, displayed between 'AFTER'
Output using 1.29.8:
Actual behavior
Environment info
The text was updated successfully, but these errors were encountered: