Learn R Programming

seekr (version 0.1.3)

print_cli: Should CLI Output Be Printed?

Description

Determines whether CLI progress or messaging functions should be executed. This helper evaluates the seekr.verbose option, checks for an interactive session, and disables output during testthat tests.

Usage

print_cli()

Arguments

Value

A logical scalar: TRUE if CLI output should be shown, FALSE otherwise.

Details

This function is designed to control conditional CLI output (e.g., cli::cli_progress_step()). It returns TRUE only when:

  • getOption("seekr.verbose", TRUE) is TRUE

  • the session is interactive (interactive())

  • testthat is not running (!testthat::is_testing())