Skip to content

Bug: Invisibly returned objects are printed in the log #275

@bzkrouse

Description

@bzkrouse

What happened?

The "Results" portion of the log captures any returned objects from the final function call, regardless of wether they are invisible or not. I would expect it to omit invisibly returned objects since the user doesn't see these in the console. Take the following example script:

my_fun <- function(x){
  return(invisible(x))
}
my_fun("do not print this")

It does not print anything to the console, but running axecute via the command line produces this section in the "Results" of the log:

--------------------------------------------------------------------------------
-                         Messages, Output, and Result                         -
--------------------------------------------------------------------------------
Messages:
	
Output:
	

Result:
	[1] "do not print this"

Is this expected behavior? If not, purrr::safely() returns visible=TRUE/FALSE which could be used to only print results with visible=TRUE.

Thanks!

Session Information

No response

Reproducible Example

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions