Archive : Skip unarchive if not an archive.

This commit is contained in:
Dmitry Voronin 2024-03-12 20:52:58 +03:00
parent 595432957a
commit 176c458e2b
2 changed files with 5 additions and 1 deletions

View file

@ -234,6 +234,10 @@ function unarchive() {
process() {
# Validate.
# _archive_check "${target}" || return 1
if ! _is_archive "${target}"; then
_iterate_skip "Not an archive."
return 0
fi
# Remote archives.
local remote

View file

@ -69,7 +69,7 @@ function _iterate_targets() {
function _iterate_skip() {
((skipped++))
[[ "${*}" = "" ]] || echo -e "${color_byellow}${*}${color_default}"
[[ "${*}" != "" ]] && echo -e "${color_byellow}${*}${color_default}"
}
# Report an error.