在~/.zshrc文件最后,增加一行:source ~/.bash_profile
如果没有 .zshrc 文件, 在相应目录下 执行 touch .zshrc 创建文件,添加 source ~/.bash_profile
解决Mac每次都要执行source ~/.bash_profile 配置的环境变量才生效的问题
回复
在~/.zshrc文件最后,增加一行:source ~/.bash_profile
如果没有 .zshrc 文件, 在相应目录下 执行 touch .zshrc 创建文件,添加 source ~/.bash_profile