ropensci / dittodb

dittodb: A Test Environment for DB Queries in R
https://dittodb.jonkeane.com/
Other
82 stars 15 forks source link

Force `curr_file_path` to be evaluated #103

Closed jonkeane closed 4 years ago

jonkeane commented 4 years ago

In capture-requests.R

  recordFetch <- quote({
    # Writing to a variable forces evaluation so that .dittodb_env$curr_file_path
    # is always available
    filepath <- .dittodb_env$curr_file_path
    if (dittodb_debug_level(1)) {
      message("Writing to ", filepath)
    }
    out <- redact_columns(ans, columns = get_redactor())
    dput(out, filepath, control = c("all", "hexNumeric"))
  })