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

cmd_install_check throws "path must be character" error if path = NULL and no env var or option is set #45

Open
snystrom opened this issue Mar 30, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@snystrom
Copy link
Owner

Solution:

x <- try(path_search(path = path) %>% cmd_ui_file_exists(),
        silent = TRUE)
    if (class(x) == "try-error") {
        # if block below is the addition, make the message a little nicer, but this is the general idea. Don't throw warning, inform that nothing is set.
        if (is.null(path)) {message("path not detected")}
        cmd_ui_file_exists(path)
        return(invisible(NULL))
    }
@snystrom snystrom self-assigned this Mar 30, 2021
@snystrom snystrom added the bug Something isn't working label Mar 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant