Skip to content

autoupdate.log grows indefinitely #1277

@martin-helmich

Description

@martin-helmich

Describe the bug
I maintain a CLI tool (and frequently use it myself) that uses the update-plugin, and recently noticed a log file in my cache directory (~/Library/Caches/<toolname>, on macOS) that seems to have grown to a significant size over the time.

martin@martins-box $ l Library/Caches/mw/autoupdate.log
-rw-r--r--@ 1 mhelmich  staff    11G 19 Feb. 09:53 Library/Caches/mw/autoupdate.log

From the looks of it, this file is created/appended in this plugin's init hook, but never rotated or cleared:

const fd = await open(autoupdatelogfile, 'a')
await writeFile(
fd,
timestamp(`starting \`${binPath} update --autoupdate\` from ${process.argv.slice(1, 3).join(' ')}\n`),
)

To Reproduce
Steps to reproduce the behavior:

  1. Use any oclif tool that uses the "update" plugin for an extended amount of time

Expected behavior
I would expect this log file to not grow to an infinite size, either be regularly rotating it, or truncating it to manageable sizes.

Screenshots
n/a

Environment (please complete the following information):

  • OS & version: macOS 26.3.1
  • Shell/terminal & version: iTerm2 + zsh

Additional context
I did not modify any of the default debounce settings, so those should still be on the default of 14 days for the stable channel.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions