Merge pull request #273 from TouchInstinct/feature/install_env_script

add install_env script for build phases
This commit is contained in:
Ivan Smolin 2021-08-09 12:05:38 +03:00 committed by GitHub
commit f5b21784fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
# When you run Git from the command line, it runs in the environment as set up by your Shell.
# GUI OS X apps, however, have no knowledge about your shell - and the PATH environment can be changed in many different places.
# Export our profile with path by ourselves
function source_home_file {
file="$HOME/$1"
[[ -f "${file}" ]] && source "${file}"
}
# Use specific exec due to Xcode has custom value of $PATH
if [ -z "$(which pmd)" ]; then
source_home_file ".bash_profile" || source_home_file ".zshrc" || true
fi