简体   繁体   中英

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.

ssdiff.sh is a call to vimdiff -R which displays the side by side diffs I prefer.

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

This resulted in diffs in the Redmine app not working.

How can I override the environment settings in the Rails application back to the defaults expected by Redmine?

Put anything you only want to affect interactive shells after a block like this (bash syntax):

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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