From db96469bfbea1ca09895d6fbeb44cdf3c4204a09 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Fri, 10 Jun 2016 16:26:39 -0700 Subject: [PATCH] only run path helper when the file exists --- dotfiles/lib/shellenv.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dotfiles/lib/shellenv.sh b/dotfiles/lib/shellenv.sh index 7ba51566..34811197 100644 --- a/dotfiles/lib/shellenv.sh +++ b/dotfiles/lib/shellenv.sh @@ -81,8 +81,11 @@ function _setup_env { } function _path_helper { - export PATH_HELPER_RAN="$(date)" - eval "$(/usr/libexec/path_helper -s)" + if [ -f /usr/libexec/path_helper ]; + then + export PATH_HELPER_RAN="$(date)" + eval "$(/usr/libexec/path_helper -s)" + fi } environment_variable_exists PATH_HELPER_RAN || _path_helper