mirror of
https://github.com/hassio-addons/bashio.git
synced 2025-05-06 12:01:25 +00:00
Replace update available logic with property access (#43)
This commit is contained in:
parent
1662ddf17f
commit
4fc9a14155
2 changed files with 6 additions and 28 deletions
15
lib/cli.sh
15
lib/cli.sh
|
@ -85,19 +85,8 @@ function bashio::cli.version_latest() {
|
|||
# Checks if there is an update available for the CLI.
|
||||
# ------------------------------------------------------------------------------
|
||||
function bashio::cli.update_available() {
|
||||
local version
|
||||
local version_latest
|
||||
|
||||
bashio::log.trace "${FUNCNAME[0]}"
|
||||
|
||||
version=$(bashio::cli.version)
|
||||
version_latest=$(bashio::cli.version_latest)
|
||||
|
||||
if [[ "${version}" = "${version_latest}" ]]; then
|
||||
return "${__BASHIO_EXIT_NOK}"
|
||||
fi
|
||||
|
||||
return "${__BASHIO_EXIT_OK}"
|
||||
bashio::log.trace "${FUNCNAME[0]}" "$@"
|
||||
bashio::cli 'cli.info.update_available' '.update_available // false'
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue