Skip to content
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

git get leaves behind empty folders if it fails #9

Closed
wallrj opened this issue Jul 24, 2020 · 1 comment · Fixed by #13
Closed

git get leaves behind empty folders if it fails #9

wallrj opened this issue Jul 24, 2020 · 1 comment · Fixed by #13

Comments

@wallrj
Copy link

wallrj commented Jul 24, 2020

I ran ./get github.com/grdl/git-get which failed because I forgot the https://, but it left behind a bunch of empty folders.

richard   master  …  github.com  grdl  git-get  ./get github.com/grdl/git-get
Cloning into '/home/richard/repositories/github.com/github.com/grdl/git-get'...
remote: Not Found
fatal: repository 'https://github.com/github.com/grdl/git-get/' not found
Error: "git clone https://github.com/github.com/grdl/git-get /home/richard/repositories/github.com/github.com/grdl/git-get": exit status 128


 richard   master  …  github.com  grdl  git-get  tree ~/repositories
/home/richard/repositories
└── github.com
    └── github.com
        └── grdl

3 directories, 0 files

I think it'd be nice to delete those if the command fails.
Maybe it could `git clone ... target/directory.tmpXXXX and then rename that after the command succeeds and delete it if the command fails.

@grdl grdl linked a pull request Jul 31, 2020 that will close this issue
@grdl grdl closed this as completed in #13 Jul 31, 2020
@grdl
Copy link
Owner

grdl commented Jul 31, 2020

Fixed in v0.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants