Expected Behavior
When cloning a repo fails, I expect no repo to be left behind so that the operation can be retried.
This matches the behaviour of git clone and gh repo clone.
Actual Behavior
yaakov@Kuat /tmp> fj -H forgejo.example.com repo clone yaakov/test-repo
Preparing...Authentication needed for https://forgejo.example.com/yaakov/test-repo.git
Username: ^C⏎ yaakov@Kuat /tmp [SIGINT]> find test-repo/
test-repo/
test-repo/.git
test-repo/.git/config
test-repo/.git/objects
test-repo/.git/objects/pack
test-repo/.git/objects/info
test-repo/.git/HEAD
test-repo/.git/info
test-repo/.git/info/exclude
test-repo/.git/description
test-repo/.git/hooks
test-repo/.git/hooks/README.sample
test-repo/.git/refs
test-repo/.git/refs/heads
test-repo/.git/refs/tags
yaakov@Kuat /tmp> fj -H forgejo.example.com repo clone yaakov/test-repo
Preparing...Error: './test-repo' exists and is not an empty directory; class=Invalid (3); code=Exists (-4)
Location:
src/repo.rs:1697:22
yaakov@Kuat /tmp>
Steps to Reproduce
No response
fj Version
fj v0.5.0
user agent: forgejo-cli/0.5.0 (https://codeberg.org/forgejo-contrib/forgejo-cli/)
build type: from source
target: aarch64-apple-darwin
Forgejo Version
15.0.4+gitea-1.22.0 built with GNU Make 4.4.1, go1.26.5 : bindata, timetzdata, sqlite, sqlite_unlock_notify
Code of Conduct
- I agree to act in accordance with the CoC & AI Agreement.
- This issue was not generated by an LLM, even in part.
### Expected Behavior
When cloning a repo fails, I expect no repo to be left behind so that the operation can be retried.
This matches the behaviour of `git clone` and `gh repo clone`.
### Actual Behavior
```
yaakov@Kuat /tmp> fj -H forgejo.example.com repo clone yaakov/test-repo
Preparing...Authentication needed for https://forgejo.example.com/yaakov/test-repo.git
Username: ^C⏎ yaakov@Kuat /tmp [SIGINT]> find test-repo/
test-repo/
test-repo/.git
test-repo/.git/config
test-repo/.git/objects
test-repo/.git/objects/pack
test-repo/.git/objects/info
test-repo/.git/HEAD
test-repo/.git/info
test-repo/.git/info/exclude
test-repo/.git/description
test-repo/.git/hooks
test-repo/.git/hooks/README.sample
test-repo/.git/refs
test-repo/.git/refs/heads
test-repo/.git/refs/tags
yaakov@Kuat /tmp> fj -H forgejo.example.com repo clone yaakov/test-repo
Preparing...Error: './test-repo' exists and is not an empty directory; class=Invalid (3); code=Exists (-4)
Location:
src/repo.rs:1697:22
yaakov@Kuat /tmp>
```
### Steps to Reproduce
_No response_
### `fj` Version
```text
fj v0.5.0
user agent: forgejo-cli/0.5.0 (https://codeberg.org/forgejo-contrib/forgejo-cli/)
build type: from source
target: aarch64-apple-darwin
```
### Forgejo Version
15.0.4+gitea-1.22.0 built with GNU Make 4.4.1, go1.26.5 : bindata, timetzdata, sqlite, sqlite_unlock_notify
### Code of Conduct
- [x] I agree to act in accordance with the CoC & AI Agreement.
- [x] This issue was not generated by an LLM, even in part.