Skip to content

Commit d86468b

Browse files
committed
Update loader to load only if file exists
1 parent 17ffcac commit d86468b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/loader.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
# Loads the current environment file
55
##################################################
66
Env__load(){
7-
source $(Env__get_filename)
7+
local to_load="$Ash__CALL_DIRECTORY/$(Env__get_filename)"
8+
if [[ -f "$to_load" ]]; then
9+
source "$to_load"
10+
fi
811
}

0 commit comments

Comments
 (0)