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

std@sys_remove_dir when trying to install git library with specific branch #622

Open
T1mL3arn opened this issue Jan 25, 2024 · 4 comments
Open

Comments

@T1mL3arn
Copy link

This

haxelib git flixel-text-input https://github.com/Starmapo/flixel-text-input.git master

ends with

Error: std@sys_remove_dir

and empty git directory.

Not using branch name

haxelib git flixel-text-input https://github.com/Starmapo/flixel-text-input.git

works though.

@tobil4sk
Copy link
Member

If you run with the --debug flag it should hopefully give more information. It looks like the repository doesn't have a master branch, so maybe it failed to checkout, and so it tried to get rid of the git folder to revert the installation but failed for some reason.

@T1mL3arn
Copy link
Author

repository doesn't have a master

Indeed I totally missed that 😢 Without --debug the error is cut, but with this flag there is error: pathspec 'master' did not match any file(s) known to git which is more clear.

@tobil4sk
Copy link
Member

Reopening because the current error hides the real issue.

@tobil4sk tobil4sk reopened this Jun 27, 2024
@ninjamuffin99
Copy link
Contributor

ninjamuffin99 commented Aug 31, 2024

One thing we can do is a bit of a check with the git command git ls-remote --symref <url> which will spit out this giant list of refs (without needing to do a repo clone at all)

> git ls-remote --symref https://github.com/Starmapo/flixel-text-input.git
ref: refs/heads/main    HEAD
951a0103a17bfa55eed86703ce50b4fb0d7590bc        HEAD
951a0103a17bfa55eed86703ce50b4fb0d7590bc        refs/heads/main
8869e6b1b8e939a64de7611265e042c4596bee82        refs/pull/1/head
320d882f86cdc4ab0b5613d156a586238253ecf0        refs/pull/3/head
7fcdb8bcf6c5a2d2d6f49d5081989e049595baec        refs/tags/v1.0.0
526eebf40935910224f982abc577e427cab14d13        refs/tags/v1.1.0
f0e616de478501acd650b98ab4e28ef323386a8a        refs/tags/v2.0.0
2c0a4f4f45285b631368b174b9c9cd7b3148fcf6        refs/tags/v2.0.1
abc1c1b3bde15b0f480c763969679da335f3a1e3        refs/tags/v2.0.2

and do some regex/parsing to return a list of remote branches. Also in this command in the first line of the output is ref: refs/heads/main HEAD which is the repo's default branch, which I've found helpful in certain cases.

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

No branches or pull requests

3 participants