tinted-theming / base16-builder-go

A base16 builder written in go, focused on convenience for template maintainers.
MIT License
50 stars 8 forks source link

Ignore missing themes #8

Closed pinpox closed 2 years ago

pinpox commented 5 years ago

When tryng to to update I get some errors, because some themes don't exist anymore in that location.

INFO[0050] Updating templates                           
DEBU[0050] Cloning "https://github.com/aaron-williamson/base16-alacritty" to "templates/alacritty"  source=alacritty
DEBU[0051] Cloning "https://github.com/evanrichter/base16-binary-ninja" to "templates/binary-ninja"  source=binary-ninja
DEBU[0052] Cloning "https://github.com/niklaas/base16-blink.git" to "templates/blink"  source=blink
DEBU[0054] Cloning "https://github.com/hrbn/base16-bbedit" to "templates/bbedit"  source=bbedit
Username for 'https://github.com': 
Password for 'https://github.com': 

It then asks for a password (which shouldn't be necessary at all) and fails even if entered. Maybe it would be an option to ignore these themes by default?

Also, would you mind supporting cloning via SSH instead of https://? This could be a flag e.g. --ssh

belak commented 5 years ago

Alright, I'm going to do my best to break this down... since this seems like 2-ish separate issues. It sounds like these are the requests:

I just tried a fresh clone and it looks like all the templates are working properly. Are you still seeing this issue?

Additionally, right now we're just using the urls directly from the base16 sources. It should be possible to translate https to ssh as long as they're github urls but I think that should be filed as a different issue.

pinpox commented 5 years ago

Hi,

yes, this are two different issues.

I just tried a fresh clone and it looks like all the templates are working properly. Are you still seeing this issue? It works at the moment because I submitted a pull request eliminating all missing links, which got merged into master. Neverthenless, this might be a temporary fix. I think it would be a good idea to skip this kind of errors anyway.

  • Make it possible to use the ssh url, rather than https This is just a suggestion, which I think could be a usefull addition

Cheers, Pablo

gidsi commented 4 years ago

Right now the same issue occurs since https://github.com/jtalowell/base16-radare2 is gone.

Would be nice to have an option to ignore the problem so i don't have to wait for the repo to fix it :)

belak commented 4 years ago

@gidsi I removed radare2 from the templates repo as it seems to have been deleted.

In terms of skipping failing clones, it's fairly complicated because of how the vcs package works. In this case, because the repo doesn't exist, github asks for your password which blocks input. We'd have to replace the layer that's used to clone repos. I would like to do this at some point, but it's a fairly large issue. I'd be open to any PRs that try to fix this, but I don't anticipate having the time to do this soon.

pinpox commented 4 years ago

In this case, because the repo doesn't exist, github asks for your password which blocks input. We'd have to replace the layer that's used to clone repos.

Couldn't this be worked around by adding a check for the status code before attempting to clone? e.g.: https://github.com/jtalowell/base16-radare2 returns a 404, we could check for the code before trying to do anything git-related

belak commented 2 years ago

This shouldn't be needed any more - the builder is now focused on building a single template at at time.