Skip to content

Should there be a cli_suppress function or similar? #156

Description

@jimhester

I think it would be somewhat common for users to want to suppress cli messages for a given chunk of code. Something like this maybe?

cli_suppress <- function(expr) {
  withCallingHandlers(
    expr,
    cli_message = function(c) {
      invokeRestart("cli_message_handled")
    }
  )
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions