-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors for bat cache --build
when cache already exists and BAT_CACHE_PATH is specified
#1726
Comments
Thank you for reporting this. I believe this is due to the fact that (after the first run) there is a subdirectory called We have seen a few variations of this bug in the past (#584, #557, #245). I thought we fixed them all. But this is new. I guess we only looked for files called |
So |
Well, there is only one subcommand that Looks like we hadn't thought about the case when there's a directory called * even worse. Due to the way |
I seem to remember that @eth-p wanted to remove the |
Since the Before we take a final decision it would be useful to know how much special-case code we can get rid of if we make this move. Probably quite a bit? Maybe someone can throw together a draft PR for that? Speaking of breakage, it currently looks like it will be hard to solve #951 without introducing some breakage, so maybe it would make sense to collect these (and maybe even more breaking changes) in a "breaking changes" release. |
I'm 110% on board with this ;) |
Alright. I'm also okay with this, if someone can detail how we design the new CLI. The
|
Here are some proposals. They all take into account that we would like to change the term
Proposal A. Similar to old CLI
Proposal B. All args namespaced, and
Proposal C. Same as B, but without separate source
Proposal D. Same as C, but with different wording
Proposal E. Structured like high-level and low-level commands
Low level commands, for maintainers and advanced users.
My current personal favorites is something akin to E. |
I also like proposal E. Thank you for writing this down. |
Hi, I've found another annoying way that the I had the So when I ran This throws an error as you might expect: error: unexpected argument '--build' found
tip: to pass '--build' as a value, use '-- --build'
Usage: bat --theme <theme> --style <components> --tabs <T> <FILE>...
For more information, try '--help'. Using |
Describe the bug you encountered:
I am attempting to distribute a custom
bat
theme with my tool to use. I want to avoid the possibility of messing with the user's installedbat
themes and theme cache.Notably, the
bat cache --build --blank
command does not work when the destination path already exists, and it throws an unusual error message.Note that it works the first time:
But fails the second time, with the exact same command:
What did you expect to happen instead?
Rebuilding the cache would also be nice, as that's the expected behavior.
A better error message would be helpful.
How did you install
bat
?brew install bat
bat version and environment
Software version
bat 0.18.1 ()
Operating system
macOS 12.0 (Darwin 21.0.0)
Command-line
Environment variables
Config file
Could not read contents of '/tmp/bat-cache-bug/bat/config': No such file or directory (os error 2).
Compile time information
Less version
The text was updated successfully, but these errors were encountered: