wrap variable with double quotes for robustness

This commit is contained in:
detailyang 2016-04-10 02:04:11 +08:00
parent 2081220ce4
commit 6cf46b1a99

View file

@ -10,7 +10,7 @@ function -S __fisher_plugin_fetch
end end
debug "validate ok %s" "$item" debug "validate ok %s" "$item"
if contains -- "$item" $enabled if contains -- "$item" $enabled
if test -z "$option" if test -z "$option"
set skipped $skipped "$item" set skipped $skipped "$item"
@ -71,9 +71,9 @@ function -S __fisher_plugin_fetch
printf "%s\n" "$name" printf "%s\n" "$name"
debug "plugin %s" "$name" debug "plugin %s" "$name"
if test ! -e $path if test ! -e "$path"
if test -L $path if test -L "$path"
set -l realpath (command readlink $path) set -l realpath (command readlink "$path")
if __fisher_file_remove "$realpath" "$fisher_file" if __fisher_file_remove "$realpath" "$fisher_file"
debug "fishfile remove broken link %s ok" "$realpath" debug "fishfile remove broken link %s ok" "$realpath"
else else