fix: use command rm for internal state cleanup#69
Merged
Conversation
Users who alias `rm` to `trash` (common macOS safety habit) saw noisy "file doesn't exist" errors from the trash CLI when lacy cleaned up its own session/temp files — `trash` doesn't honor `-f` semantics like `rm`. Switches internal cleanup paths (preheat session files, screen-capture tempfile, streaming temp file, conversation file) to `command rm -f` so they bypass user aliases. Install/uninstall paths in `bin/lacy` are left alone since trash semantics may be desirable there.
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates several shell scripts to use command rm -f instead of a direct rm -f call. This ensures that the standard system utility is executed directly, bypassing any user-defined aliases or shell functions for rm. There are no review comments to address, and I have no additional feedback to provide.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rmtotrash(common macOS habit) saw noisy "file doesn't exist" errors from the trash CLI when running things liketool set claude, becausetrashdoesn't honorrm -fsemantics on missing files.lib/core/{preheat,context,mcp,commands}.shtocommand rm -fso it bypasses user aliases.bin/lacyare intentionally left alone — trash semantics may be desirable there.Repro (before)
Test plan
alias rm=trashin shell:tool set claudeproduces no noisetool set auto/tool set lashlikewise silent/newsession doesn't emit trash errors