vfclists
vfclists

Reputation: 20211

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?

Upvotes: 0

Views: 108

Answers (1)

Camden Narzt
Camden Narzt

Reputation: 2003

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

Upvotes: 1

Related Questions