Skip to content

Commit

Permalink
make: quote eval array definitions to work around shellcheck SC1036 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Apr 24, 2019
1 parent ea3c900 commit abe266c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions completions/make
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ _make()
for (( i=0; i < ${#words[@]}; i++ )); do
if [[ ${words[i]} == -@(C|-directory) ]]; then
# eval for tilde expansion
eval makef_dir=( -C "${words[i+1]}" )
eval "makef_dir=( -C \"${words[i+1]}\" )"
break
fi
done
Expand All @@ -139,7 +139,7 @@ _make()
for (( i=0; i < ${#words[@]}; i++ )); do
if [[ ${words[i]} == -@(f|-?(make)file) ]]; then
# eval for tilde expansion
eval makef=( -f "${words[i+1]}" )
eval "makef=( -f \"${words[i+1]}\" )"
break
fi
done
Expand Down

0 comments on commit abe266c

Please sign in to comment.