print_cli: Should CLI Output Be Printed?

View source: R/utils.R

print_cliR Documentation

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

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

Value

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


seekr documentation built on June 8, 2025, 11:13 a.m.