How can I get rid of something running on every new terminal session?

后端 未结 7 2055
别跟我提以往
别跟我提以往 2021-02-10 02:27

I am using Lion. I have an error that outputs on every new terminal session:

-bash: __rvm_add_to_path: command not found

It\'s an almost brand

7条回答
  •  清酒与你
    2021-02-10 03:00

    In your /etc/profile change the line:

    source /etc/profile.d/rvm.sh

    into:

    if [ "${SHELL}" != "/bin/sh" ]; then
      source /etc/profile.d/rvm.sh
    fi
    

    Why?

    In Mac OS X the default shell of superuser (root) is a POSIX shell, not a pure Bash. Adding such condition will disable rvm for (possibly) emerygency shell /bin/sh, used by system administrator. That is good. If you would like to install something using root's account, you can always type bash and then rvm … in a command line.

提交回复
热议问题