Closed cho-m closed 3 years ago
Oh, good catch!
I guess this only happens if you set the TEALDEER_CACHE_DIR
variable, right?
I'm not yet sure what the ideal solution would be. Either the cache dir is implicitly created, or we only delete contents instead of the full directory.
I guess this only happens if you set the
TEALDEER_CACHE_DIR
variable, right?
I think so (at least it is the case for me on macOS).
❯ unset TEALDEER_CACHE_DIR
❯ tldr --clear-cache
Successfully deleted cache.
Successfully updated cache.
I'm not yet sure what the ideal solution would be. Either the cache dir is implicitly created, or we only delete contents instead of the full directory.
Both are valid options.
In case of latter, there should probably be some documentation that the user will need to mkdir
on initial setup.
In my experience, a lot of modern tools do try to implicitly create directories.
The tools I use that require manual creation are usually older like: less
, zsh
, gnupg
, vim
I just wonder if creating the directory (including all parent directories) could have undesired side effects. It could mask a typo, for example.
On the other hand, that's easy to fix. Creating the directory automatically (just like it's being done for the default directory path) would probably be the best approach.
tldr --clear-cache
deletes the$TEALDEER_CACHE_DIR
folder buttldr --update
is unable to remake the folder.Also, error messages in
--show-paths
: