From 8991f8c2b81cd7f10f800268d0790a6f3b6feb97 Mon Sep 17 00:00:00 2001 From: Aleksandr Shushkov Date: Tue, 7 Dec 2021 16:05:29 +0300 Subject: [PATCH] Fix PR issues from @petropavel13 --- xcode/aux_scripts/install_env.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/xcode/aux_scripts/install_env.sh b/xcode/aux_scripts/install_env.sh index 2b6feec..379c640 100644 --- a/xcode/aux_scripts/install_env.sh +++ b/xcode/aux_scripts/install_env.sh @@ -18,12 +18,14 @@ function source_home_file { file="$HOME/$1" if [[ -f "${file}" ]]; then - export_commands="$(cat "${file}" | grep "^export PATH=")" + if ! source "${file}"; then + export_commands="$(cat "${file}" | grep "^export PATH=")" - while read export_command - do - eval "$export_command" - done <<< "$export_commands" + while read export_command + do + eval "$export_command" + done <<< "$export_commands" + fi fi return 1