-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fail when there is no remote in git repo #832
Comments
Thanks for raising this! Since onefetch is supposed to work without fetching any remote data, it makes sense to me that we should support repositories that don't even have a remote. Perhaps as a reasonable fallback, we can use the name of the directory as the project's name when there is no remote URL. TBH I was a bit surprised that the error occurred here instead of somewhere before. Digging into the code, it's because we just use an empty string when there are no remotes. I think it makes sense to avoid converting I guess this counts as an enhancement since we don't have any intended behavior for repos without remotes as far as I remember 🤷 |
Thanks for pointing that out, @o2sh! Didn't realize we had previously supported remoteless repositories. Updated labels to match. |
Should be fixed in the latest release |
Do we keep this open to implement @spenserblack's suggestion? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
When I execute onefetch in a local git repo where no remote is set I have a failure. onefetch is installed with cargo and updated to the last version
thread 'main' panicked at 'non-empty path', ~/.cargo/registry/src/github.heygears.com-1ecc6299db9ec823/onefetch-2.13.1/src/info/repo/project.rs:31:10
note: run with
RUST_BACKTRACE=1
environment variable to display a backtraceThe text was updated successfully, but these errors were encountered: