Fix PR issues from @petropavel13

This commit is contained in:
Aleksandr Shushkov 2021-12-07 16:05:29 +03:00
parent d96c126fe2
commit 8991f8c2b8
1 changed files with 7 additions and 5 deletions

View File

@ -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