简体   繁体   English

如何覆盖Rails从我的环境继承的设置?

[英]How can I override the settings Rails inherits from my environment?

I changed the program in my .profile used by git diff to one of my own, which breaks the diffs in a Redmine application. 我将git diff使用的.profile的程序更改为自己的程序,这破坏了Redmine应用程序中的差异。

ssdiff.sh is a call to vimdiff -R which displays the side by side diffs I prefer. ssdiff.sh是对vimdiff -R的调用,它显示了我喜欢的并排比较。

# environment variables
GIT_EXTERNAL_DIFF=$HOME/bin/ssdiff.sh
export GIT_EXTERNAL_DIFF

This resulted in diffs in the Redmine app not working. 这导致Redmine应用程序中的差异无法正常工作。

How can I override the environment settings in the Rails application back to the defaults expected by Redmine? 如何将Rails应用程序中的环境设置改回Redmine期望的默认值?

Put anything you only want to affect interactive shells after a block like this (bash syntax): 在这样的代码块之后(bash语法)将您只想影响交互式shell的所有内容放进去:

#exit if non-interactive
if [[  ! ( $- =~ "i" ) ]]; then
    return 0
fi

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM