Skip to content

Commit

Permalink
fix: ensure shims get created when data dir has spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
mook-as committed Jul 14, 2021
1 parent 60e0e05 commit 8ce338a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions lib/commands/command-reshim.bash
Expand Up @@ -103,9 +103,12 @@ generate_shim_for_executable() {
generate_shims_for_version() {
local plugin_name=$1
local full_version=$2
for executable_path in $(plugin_executables "$plugin_name" "$full_version"); do
local executable_path
local all_plugin_executables
all_plugin_executables="$(plugin_executables "$plugin_name" "$full_version")"
while read -r executable_path; do
write_shim_script "$plugin_name" "$full_version" "$executable_path"
done
done <<< "${all_plugin_executables}"
}

remove_obsolete_shims() {
Expand Down
6 changes: 4 additions & 2 deletions lib/utils.bash
Expand Up @@ -576,13 +576,15 @@ with_plugin_env() {
plugin_executables() {
local plugin_name=$1
local full_version=$2
for bin_path in $(list_plugin_exec_paths "$plugin_name" "$full_version"); do
local bin_path all_bin_paths
all_bin_paths="$(list_plugin_exec_paths "$plugin_name" "$full_version")"
while read -r bin_path; do
for executable_file in "$bin_path"/*; do
if is_executable "$executable_file"; then
printf "%s\\n" "$executable_file"
fi
done
done
done <<< "${all_bin_paths}"
}

is_executable() {
Expand Down

0 comments on commit 8ce338a

Please sign in to comment.