-
Notifications
You must be signed in to change notification settings - Fork 29
Description
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.logFrom the looks of it, this file is created/appended in this plugin's init hook, but never rotated or cleared:
plugin-update/src/hooks/init.ts
Lines 72 to 76 in 7d590d6
| 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:
- 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.