Skip to content

Commit

Permalink
fix based on linting recommendations
Browse files Browse the repository at this point in the history
  • Loading branch information
laidbackware committed Apr 30, 2021
1 parent f046931 commit 88f428e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/commands/command-list-all.bash
Expand Up @@ -4,10 +4,11 @@ list_all_command() {
local plugin_name=$1
local query=$2
local plugin_path
local std_out
local std_err
plugin_path=$(get_plugin_path "$plugin_name")
check_if_plugin_exists "$plugin_name"

local versions
# Capture return code to allow error handling
return_code=0 && split_outputs std_out std_err "bash ${plugin_path}/bin/list-all" || return_code=$?

Expand Down Expand Up @@ -36,8 +37,8 @@ function split_outputs() {
{
IFS=$'\n' read -r -d '' "${1}";
IFS=$'\n' read -r -d '' "${2}";
(IFS=$'\n' read -r -d '' _ERRNO_; return ${_ERRNO_});
} < <((printf '\0%s\0%d\0' "$(((({ ${3}; printf "${?}\n" 1>&3-; } | tr -d '\0' 1>&4-) 4>&2- 2>&1- | tr -d '\0' 1>&4-) 3>&1- | exit "$(cat)") 4>&1-)" "${?}" 1>&2) 2>&1)
(IFS=$'\n' read -r -d '' _ERRNO_; return "${_ERRNO_}");
} < <((printf '\0%s\0%d\0' "$( ( ( ( { ${3}; printf "%s\n" ${?} 1>&3-; } | tr -d '\0' 1>&4-) 4>&2- 2>&1- | tr -d '\0' 1>&4-) 3>&1- | exit "$(cat)") 4>&1-)" "${?}" 1>&2) 2>&1)
}

list_all_command "$@"

0 comments on commit 88f428e

Please sign in to comment.