Skip to content

get_brew_outdated_formula_list checks the npm cache file instead of the brew cache file #169

@ooloth

Description

@ooloth

Current state

get_brew_outdated_formula_list in tools/homebrew/utils.bash references NPM_OUTDATED_LIST_CACHE_FILE — a variable defined in tools/node/utils.bash — on both lines 96 (existence check) and 102 (stat age check). The function is intended to manage a brew-specific cache, but it reads and checks the age of the npm cache file instead. This means the function either finds the npm cache when it expects to find the brew cache, or misses the brew cache entirely — making the cache-age logic silently wrong.

Ideal state

  • get_brew_outdated_formula_list references BREW_OUTDATED_LIST_CACHE_FILE on both lines 96 and 102.
  • The function behaves identically to the parallel npm utility, reading and checking the correct brew-specific cache file.
  • No reference to NPM_OUTDATED_LIST_CACHE_FILE exists within tools/homebrew/utils.bash.

Starting points

  • tools/homebrew/utils.bash lines 88–110 — the full get_brew_outdated_formula_list function
  • tools/node/utils.bash — the parallel npm pattern this function should mirror

QA plan

  1. Run grep -n "NPM_OUTDATED_LIST_CACHE_FILE" tools/homebrew/utils.bash — expect no output.
  2. Open tools/homebrew/utils.bash and confirm both the existence check and the stat call use BREW_OUTDATED_LIST_CACHE_FILE.
  3. Source the file and call get_brew_outdated_formula_list — expect it to check and populate a brew-specific cache file, not the npm one.

Done when

get_brew_outdated_formula_list references BREW_OUTDATED_LIST_CACHE_FILE exclusively and contains no reference to NPM_OUTDATED_LIST_CACHE_FILE.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions