Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct null behavior #85

Merged
merged 2 commits into from
Jan 6, 2023
Merged
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
Next Next commit
correct null behaviour
ikifar2012 committed Jan 3, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit cdc146d6dad20af768f725608254c1d8208b47c4
6 changes: 3 additions & 3 deletions remote-backup/run.sh
Original file line number Diff line number Diff line change
@@ -124,7 +124,7 @@ function create-local-backup {

local unformatted_folders="${base_folders}"
local unformatted_addons=$(bashio::supervisor.addons)

if bashio::config.has_value "backup_exclude_folders"; then
local -r backup_exclude_folders=$(bashio::config "backup_exclude_folders")
bashio::log.notice "Excluded folder(s):\n${backup_exclude_folders}"
@@ -286,7 +286,7 @@ function clone-to-remote {
}

function delete-local-backup {
if bashio::config.equals "backup_keep_local" "all" || bashio::config.equals "backup_keep_local" "null"; then
if bashio::config.equals "backup_keep_local" "all"; then
bashio::log.debug "Keep all backups."
return "${__BASHIO_EXIT_OK}"
fi
@@ -295,7 +295,7 @@ function delete-local-backup {
bashio::log.warning "Failed to reload backups!"
fi

if bashio::config.is_empty "backup_keep_local"; then
if bashio::config.is_empty "backup_keep_local" || bashio::config.equals "backup_keep_local" "null"; then
if bashio::var.has_value "$SLUG"; then
bashio::log.notice "Deleting local backup: ${SLUG}"
if ! bashio::api.supervisor DELETE /backups/${SLUG}; then