View source: R/utils-versions.R
check_newer_version | R Documentation |
Checks if a newer version of Quarto is available and informs the user about their current version status. The function compares the current Quarto version against the latest stable and prerelease versions available online.
check_newer_version(version = quarto_version(), verbose = TRUE)
version |
Character string specifying the Quarto version to check.
Defaults to the currently installed version detected by |
verbose |
Logical indicating whether to print informational messages.
Defaults to |
The function handles three scenarios:
Development version (99.9.9): Skips version check with informational message
Prerelease version: Compares against latest prerelease and informs about updates
Stable version: Compares against latest stable version and suggests updates if needed
Version information is fetched from Quarto's download JSON endpoints and cached in current session for up to 24 hours to avoid repeated network requests.
Invisibly returns a logical value:
TRUE
if an update is available
FALSE
if no update is needed or when using development version
The function is primarily called for its side effects of printing
informational messages (when verbose = TRUE
).
This function requires an internet connection to fetch the latest version information from quarto.org. If the network request fails, an error will be thrown.
quarto_version()
for getting the current Quarto version,
# Check current Quarto version
check_newer_version()
# Check a specific version
check_newer_version("1.7.30")
# Check development version (will skip check)
check_newer_version("99.9.9")
# Check silently without messages
result <- check_newer_version(verbose = FALSE)
if (result) {
message("Update available!")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.