check_newer_version: Check for newer version of Quarto

View source: R/utils-versions.R

check_newer_versionR Documentation

Check for newer version of Quarto

Description

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.

Usage

check_newer_version(version = quarto_version(), verbose = TRUE)

Arguments

version

Character string specifying the Quarto version to check. Defaults to the currently installed version detected by quarto_version(). Use "99.9.9" to indicate a development version.

verbose

Logical indicating whether to print informational messages. Defaults to TRUE. When FALSE, the function runs silently and only returns the logical result.

Details

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.

Value

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).

Network Requirements

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.

See Also

quarto_version() for getting the current Quarto version,

Examples


# 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!")
}


quarto documentation built on Sept. 9, 2025, 5:52 p.m.