From d86468bb3acf1ced62e7e95041a90b0fc12d606a Mon Sep 17 00:00:00 2001 From: BrandonRomano Date: Fri, 21 Oct 2016 09:00:03 -0400 Subject: [PATCH] Update loader to load only if file exists --- lib/loader.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/loader.sh b/lib/loader.sh index f09ff2c..2c5eda4 100644 --- a/lib/loader.sh +++ b/lib/loader.sh @@ -4,5 +4,8 @@ # Loads the current environment file ################################################## Env__load(){ - source $(Env__get_filename) + local to_load="$Ash__CALL_DIRECTORY/$(Env__get_filename)" + if [[ -f "$to_load" ]]; then + source "$to_load" + fi }