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

cloning non-existent info repo for an extended time #5

Open
jenna-a2ai opened this issue Oct 30, 2024 · 1 comment
Open

cloning non-existent info repo for an extended time #5

jenna-a2ai opened this issue Oct 30, 2024 · 1 comment

Comments

@jenna-a2ai
Copy link
Collaborator

jenna-a2ai commented Oct 30, 2024

When trying to clone a non-existing repo, this error pops up after ~5 minutes. To prevent this, should add a check/timeout verification that the URL is accessible

Screenshot 2024-10-30 at 11 23 10 AM

@wes-a2ai wes-a2ai transferred this issue from A2-ai/ghqc.app Oct 30, 2024
@wes-a2ai
Copy link
Collaborator

wes-a2ai commented Oct 30, 2024

Potential fix code draft withr::with_options(list(timeout = min(5, getOption("timeout"))), download.file(ghqc_info_repo, tempfile(), method = "libcurl"))

In this function and/or during renviron write helpers

ghqc/R/info_repo.R

Lines 196 to 204 in 80e490e

check_ghqc_info_repo_exists <- function() {
if (!fs::file_exists("~/.Renviron")) info_repo_not_found()
readRenviron("~/.Renviron")
info_repo <- Sys.getenv("GHQC_INFO_REPO")
if (info_repo == "") info_repo_not_found()
if (substr(info_repo, 1, 8) != "https://") {
cli::cli_abort("GHQC_INFO_REPO ({info_repo}) does not start with 'https://'")
}
}

@wes-a2ai wes-a2ai changed the title cloning non-existent info repo bug cloning non-existent info repo hands for an extended time Oct 31, 2024
@jenna-a2ai jenna-a2ai changed the title cloning non-existent info repo hands for an extended time cloning non-existent info repo for an extended time Nov 7, 2024
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

2 participants