mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 09:38:16 -07:00
Don't allow unset variables in the list commands
This commit is contained in:
parent
03f2fb7e4c
commit
e72f421be2
@ -1,4 +1,7 @@
|
||||
# -*- sh -*-
|
||||
|
||||
set -o nounset
|
||||
|
||||
# shellcheck source=lib/functions/versions.bash
|
||||
. "$(dirname "$(dirname "$0")")/lib/functions/versions.bash"
|
||||
|
||||
|
@ -1,8 +1,10 @@
|
||||
# -*- sh -*-
|
||||
|
||||
set -o nounset
|
||||
|
||||
list_command() {
|
||||
local plugin_name=$1
|
||||
local query=$2
|
||||
local plugin_name=${1:-}
|
||||
local query=${2:-}
|
||||
|
||||
if [ -z "$plugin_name" ]; then
|
||||
local plugins_path
|
||||
@ -24,9 +26,10 @@ list_command() {
|
||||
}
|
||||
|
||||
display_installed_versions() {
|
||||
local plugin_name=$1
|
||||
local query=$2
|
||||
local plugin_name=${1:-}
|
||||
local query=${2:-}
|
||||
local versions
|
||||
|
||||
versions=$(list_installed_versions "$plugin_name")
|
||||
|
||||
if [[ $query ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user