-
Notifications
You must be signed in to change notification settings - Fork 13
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
Support more assets formats (lefthook) #72
Comments
The problem seems to be that lefthook has both the raw executable unzipped, and as .gz zip. and Rokit seems to think the raw unzipped asset is the best option, but then it can't extract it because its not compressed. So either, Rokit should prioritize/sort on compressed file formats, zip, gz, tar gz, or it should support downloading executables from assets that aren't compressed. + it seems rokit doesn't support .gz, only tgz and tar.gz. |
Some background: This is a great Lefthook config for a more professional workflow in Rojo: lefthook.yml pre-commit:
commands:
selene:
glob: "*.{lua}"
run: selene {staged_files}
stylua:
glob: "*.{lua}"
run: stylua {staged_files}
stage_fixed: true |
Looks like this mostly falls under #4 , however, looking at that release, it definitely seems like it should be grabbing one of the compatible (compressed) artifacts, and not trying to use one that Rokit doesn't know how to handle. Seems like a bug to me. |
I cloned it, and from debugging, I can tell it tries to download https://api.github.com/repos/evilmartians/lefthook/releases/assets/186574661, which goes well, but then with extracting, it goes wrong. seems like it doesn't handle .gz files properly yet. Any chance you can have a look? It fails here: rokit/lib/sources/artifact/mod.rs Line 77 in 9b8097c
|
Ah, I missed that those |
yeah its a bit in between. a .gz file, is a zip/tar.gz file with a single file in it. but thats not what #66 implements. Although in lefthooks case, it ALSO has bare/raw exectuable files as artifacts. for every os/arch it has 2 artifacts, a raw executable, which is implemented in #66, and also a .gz file, which is simply the same format as the other compressed formats, .zip,.tar.gz etc. https://github.com/evilmartians/lefthook/releases/download/v1.7.14/lefthook_1.7.14_Windows_x86_64.exe are 2 of the same artifacts from lefthook with different filetypes. 1 raw and 1 zipped. |
Another unrelated bug I found, is if you add a tool, using |
I kinda need the feature so I made a PR #73 . would be awesome if you could review it |
I'm trying to install lefthook for better pre-commit hook support, but rokit cant properly identify the right asset, but there are definitely assets that feel like they should be compatible:
https://github.com/evilmartians/lefthook/releases/tag/v1.7.14
(I'm on windows)
The text was updated successfully, but these errors were encountered: