【问题标题】:Where to source .profile in .bash_profile to install RVM in Cygwin?在 .bash_profile 中的何处获取 .profile 以在 Cygwin 中安装 RVM?
【发布时间】:2023-04-06 18:11:01
【问题描述】:

我正在使用 cygwin 在 Windows 机器上安装 RVM。我使用命令是curl -L https://get.rvm.io | bash -s stable 来获取RVM。但有一个问题。请参阅下面输出中的警告部分,请帮助我修复它。

# mspc,
#
#   Thank you for using RVM!
#   We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.

In case of problems: http://rvm.io/help and https://twitter.com/rvm_io

  * WARNING: You have '~/.profile' file, you might want to load it,
    to do that add the following line to '/home/mspc/.bash_profile':

      source ~/.profile

我把这行代码放在哪里?

.bash_profile 文件的源代码 -

# base-files version 4.2-3

# ~/.bash_profile: executed by bash(1) for login shells.

# The latest version as installed by the Cygwin Setup program can
# always be found at /etc/defaults/etc/skel/.bash_profile

# Modifying /etc/skel/.bash_profile directly will prevent
# setup from updating it.

# The copy in your home directory (~/.bash_profile) is yours, please
# feel free to customise it to create a shell
# environment to your liking.  If you feel a change
# would be benifitial to all, please feel free to send
# a patch to the cygwin mailing list.

# User dependent .bash_profile file

# source the users bashrc if it exists
if [ -f "${HOME}/.bashrc" ] ; then
  source "${HOME}/.bashrc"
fi

# Set PATH so it includes user's private bin if it exists
# if [ -d "${HOME}/bin" ] ; then
#   PATH="${HOME}/bin:${PATH}"
# fi

# Set MANPATH so it includes users' private man if it exists
# if [ -d "${HOME}/man" ]; then
#   MANPATH="${HOME}/man:${MANPATH}"
# fi

# Set INFOPATH so it includes users' private info if it exists
# if [ -d "${HOME}/info" ]; then
#   INFOPATH="${HOME}/info:${INFOPATH}"
# fi

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

【问题讨论】:

    标签: linux bash unix cygwin rvm


    【解决方案1】:

    您可以在该文件的任何位置添加该行。唯一的问题是是否需要在加载 rvm 之前或之后加载,我无法回答。

    您是否需要这样做取决于该文件中是否有您实际需要的任何内容,因为很可能没有。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-11-04
      • 1970-01-01
      • 2019-07-02
      • 2015-11-12
      • 2018-10-07
      • 2013-05-04
      • 2014-08-19
      相关资源
      最近更新 更多