From 2bdf1656661201e85bc00c78e4d8dc7f6cbf686a Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 27 May 2021 16:56:06 +0200 Subject: [PATCH] Fix bug to undefined method in jq.has_value (#77) * Fix bug to undefined method in jq.has_value * Address shellcheck lint warning --- lib/bashio.sh | 2 +- lib/jq.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bashio.sh b/lib/bashio.sh index 1f31dd5..f4f638b 100644 --- a/lib/bashio.sh +++ b/lib/bashio.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# shellcheck disable=SC2034 +# shellcheck disable=SC2034,SC2155 # ============================================================================== # Home Assistant Community Add-ons: Bashio # Bashio is an bash function library for use with Home Assistant add-ons. diff --git a/lib/jq.sh b/lib/jq.sh index fe727b5..1c448be 100644 --- a/lib/jq.sh +++ b/lib/jq.sh @@ -64,7 +64,7 @@ function bashio::jq.has_value() { value=$(bashio::jq "${data}" \ "${filter} | if (. == {} or . == []) then empty else . end // empty") - if ! hass.has_value "${value}"; then + if ! bashio::var.has_value "${value}"; then return "${__BASHIO_EXIT_NOK}" fi