Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions lib/addons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@
# $1 Add-on slug (optional, default: self)
# ------------------------------------------------------------------------------
function bashio::addon.update() {
local slug=${1:-$(bashio::addon.slug)}
local slug=${1:-'self'}
# This call is redirected to the store, and store doesn't support 'self'
if bashio::var.equals() "${slug}" 'self'; then

Check failure on line 102 in lib/addons.sh

View workflow job for this annotation

GitHub Actions / Shellcheck

Fix any mentioned problems and try again.

Check failure on line 102 in lib/addons.sh

View workflow job for this annotation

GitHub Actions / Shellcheck

Expected a { to open the function definition.

Check failure on line 102 in lib/addons.sh

View workflow job for this annotation

GitHub Actions / Shellcheck

Couldn't parse this function. Fix to allow more checks.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
slug=$(bashio::addon.slug)
fi
bashio::log.trace "${FUNCNAME[0]}"
bashio::api.supervisor POST "/store/addons/${slug}/update"
bashio::cache.flush_all
Expand All @@ -122,8 +126,11 @@
# $1 Add-on slug (optional, default: self)
# ------------------------------------------------------------------------------
function bashio::addon.documentation() {
local slug=${1:-'self'}
# This call is redirected to the store, and store doesn't support 'self'
local slug=${1:-$(bashio::addon.slug)}
if bashio::var.equals() "${slug}" 'self'; then
slug=$(bashio::addon.slug)
fi
bashio::log.trace "${FUNCNAME[0]}"
bashio::api.supervisor GET "/addons/${slug}/documentation" true
}
Expand All @@ -135,8 +142,11 @@
# $1 Add-on slug (optional, default: self)
# ------------------------------------------------------------------------------
function bashio::addon.changelog() {
local slug=${1:-'self'}
# This call is redirected to the store, and store doesn't support 'self'
local slug=${1:-$(bashio::addon.slug)}
if bashio::var.equals() "${slug}" 'self'; then
slug=$(bashio::addon.slug)
fi
bashio::log.trace "${FUNCNAME[0]}"
bashio::api.supervisor GET "/addons/${slug}/changelog" true
}
Expand Down
Loading