@@ -73,7 +73,7 @@ backup_if_exists ()
7373 fi
7474}
7575
76- expand_tilde ()
76+ expand_tilde_path ()
7777{
7878 local expand_string=" $1 " return_string
7979 # Tilde does not expand like a variable, this might lead to files not being found
@@ -107,9 +107,12 @@ check_exist_executable ()
107107
108108get_bindir ()
109109{
110- # Taken from https://stackoverflow.com/a/246128/3180795
111- local resolve_file=" $1 " description=" $2 " link_target directory_name resolve_dir_name
110+ # Resolves the absolute location of parameter and returns it
111+ # partially taken from https://stackoverflow.com/a/246128/3180795
112+ local resolve_file=" $1 " description=" $2 "
113+ local link_target directory_name resolve_dir_name
112114 debug " Getting directory for '$resolve_file '."
115+ resolve_file=$( expand_tilde_path " $resolve_file " )
113116
114117 # Check if anything exists in this location, otherwise abort.
115118 if [[ ! -e " $resolve_file " ]] ; then
@@ -434,7 +437,7 @@ ask_installation_path ()
434437 # Will be empty if skipped; can return without assigning/testing empty values
435438 [[ -z $use_xtbpath ]] && return
436439 debug " use_xtbpath=$use_xtbpath "
437- use_xtbpath=" $( expand_tilde " $use_xtbpath " ) "
440+ use_xtbpath=" $( expand_tilde_path " $use_xtbpath " ) "
438441 if check_exist_executable " $use_xtbpath " ; then
439442 use_xtbhome=$( get_bindir " $use_xtbpath " " XTB bin directory" ) && use_xtbname=${use_xtbpath##*/ }
440443 use_xtbhome=" ${use_xtbhome%/ bin} "
0 commit comments