We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bbf3105 commit e44e864Copy full SHA for e44e864
1 file changed
hook
@@ -9,8 +9,13 @@ HAS_NODE=`which node 2> /dev/null || which nodejs 2> /dev/null || which iojs 2>
9
#
10
# https://answers.atlassian.com/questions/140339/sourcetree-hook-failing-because-paths-don-t-seem-to-be-set-correctly
11
12
+function source_home_file {
13
+ file="$HOME/$1"
14
+ [[ -f "${file}" ]] && source "${file}"
15
+}
16
+
17
if [[ -z "$HAS_NODE" ]]; then
- source ~/.bash_profile || source ~/.zshrc || true
18
+ source_home_file ".bash_profile" || source_home_file ".zshrc" || true
19
fi
20
21
NODE=`which node 2> /dev/null`
0 commit comments