-
Notifications
You must be signed in to change notification settings - Fork 294
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
Glob fails to link if there's only one file #282
Comments
I can confirm this with a new test case I created, and that it worked as of the last tagged version (v.1.19.0), and failed after a patch (that I wrote) was merged into |
Thanks for looking into it! @jwpeddle for the moment, you could use Dotbot v1.19.0 ( |
I have a fix of a sort - line 73 of
to
... but I'm not sure the reason one would want to specify Unless there is a clear use-case for allowing the use of I suppose the possible use case is when people want to put Looking for feedback. |
Done, and confirmed working, thanks! 🎈 |
+1 on this one
Well, I guess the that's the fault of the question. IMO it's better to ask if specifying There are a few pro's I can think of right away:
I don't really have any other examples, as I rarely utilize globs. The way I found this issue is that I recently removed one of my Polybar scripts, and after re-installing my dotfiles on another machine, the whole
Thus I got here. Well, after finally noticing what dotbot was even talking about with the "Some tasks were not executed successfully" - which leads onto my next point.
This is also very valid, there is no color/formatting difference between information & warnings/errors. I don't have a screenshot on hand, but I can get one if needed. |
Came here after scratching my head for quiet a while. This bug was reported more than two years ago. Is dotbot still being maintained? If there is anyone with commit access still in the project, may I suggest to immediately add the 2-3 lines of code that would be needed to identify when the unexpected behaviour is triggered, and print a warning message - however short - to the console? That would be fair to the users in my opinion, respecting their time and possibly saving someone some frustration. (Duplicate: #315) ./install --version
Dotbot version 1.19.1 (git b'53b3781fbb') |
See #282 and #315. This patch simplifies the implementation, removing special-case handling for the cases of zero matches and one match. Instead, any situation where `glob: true` is specified and the path contains a glob character (any of "?", "*", or "[") is treated as a glob case. The reason we check both `use_glob` and `_has_glob_chars()` is to more gracefully handle the case where the user has enabled globs by default, but most links do not contain glob characters and should not be treated as globs.
Thanks, should be fixed in 416f32f (released in 1.19.2). |
When I try to use glob with only one file in the source directory, dotbot fails to create the link with "Nonexistent source for.."
Adding a second file without changing anything else makes it function as expected. I would expect it to behave the same regardless of how many files are in the dir.
Why bother using glob if there's only one file? Because it means if I add a second file later, I don't need to also edit my install.conf.yaml. Almost always, I just want to symlink whatever is in the source directory. It took some squinting to even identify what was going wrong.
The text was updated successfully, but these errors were encountered: