From da40a93ae19b1e4b35c1f5af6cb017905c99a047 Mon Sep 17 00:00:00 2001 From: Aaron Fiore Date: Wed, 22 Oct 2025 14:26:26 -0700 Subject: [PATCH] container: lib_taxes: don't attempt to patch non-existent taxable events An optimization and printing cleanup (attempts to patch won't break) --- container/src/finance/lib/internal/lib_taxes.bash | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/container/src/finance/lib/internal/lib_taxes.bash b/container/src/finance/lib/internal/lib_taxes.bash index 0160498..db01876 100644 --- a/container/src/finance/lib/internal/lib_taxes.bash +++ b/container/src/finance/lib/internal/lib_taxes.bash @@ -1061,10 +1061,6 @@ function lib_taxes::__taxes_write() # Patch transparent (full) reports # WARNING: depends on previous base path / extension format # TODO: no, not this way - lib_utils::print_custom " \e[32m│\e[0m\n" - lib_utils::print_custom " \e[32m│\e[0m\t\e[37;2m ... Applying patches (full) ...\e[0m\n" - lib_utils::print_custom " \e[32m│\e[0m\n" - lib_taxes::__reports_patch lib_utils::catch $? @@ -1145,6 +1141,12 @@ function lib_taxes::__reports_patch() local _spends="${_tax_root_dir}/spends/${_tax_year}_spends-${_ext_full}" local _trades="${_tax_root_dir}/trades/${_tax_year}_trades-${_ext_full}" + [[ ! -s "$_income" && ! -s "$_spends" && ! -s "$_trades" ]] && return 0 + + lib_utils::print_custom " \e[32m│\e[0m\n" + lib_utils::print_custom " \e[32m│\e[0m\t\e[37;2m ... Applying patches (full) ...\e[0m\n" + lib_utils::print_custom " \e[32m│\e[0m\n" + # Ensure appropriate tags in respective files # # NOTE: