Skip to content

Commit 57fcd34

Browse files
committed
fix (license-cache): Fixed logic used to trigger updating license caches
Signed-off-by: rafaeljohn9 <rafaeljohb@gmail.com>
1 parent f4e90cf commit 57fcd34

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/commands/license/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fn ensure_spdx_license_cache(
5151
let should_update = cache_manager
5252
.should_update_cache::<serde_json::Value>(SPDX_CACHE_NAME, CACHE_MAX_AGE_SECONDS)?;
5353

54-
if !should_update || !update_cache {
54+
if !should_update && !update_cache {
5555
let cache = cache_manager.load_cache(SPDX_CACHE_NAME)?;
5656
// Only print if running in verbose/debug mode (not implemented here)
5757
// e.g., println!("Loaded license template cache ({} templates)", cache.entries.len());
@@ -94,7 +94,7 @@ fn ensure_github_api_license_cache(
9494
CACHE_MAX_AGE_SECONDS,
9595
)?;
9696

97-
if !should_update || update_cache {
97+
if !should_update && !update_cache {
9898
let cache = cache_manager.load_cache(GITHUB_LICENSES_CACHE_NAME)?;
9999
// Only print if running in verbose/debug mode (not implemented here)
100100
// e.g., println!("Loaded GitHub licenses cache ({} licenses)", cache.entries.len());

0 commit comments

Comments
 (0)