Prevent prex from changing certain session options
jennybc opened this issue · comments
Jennifer (Jenny) Bryan commented
Now, first, remember that prex()
is unexported precisely because it creates leakage between your current R session and your (re)prex. So in general, prex()
users have to take the bad with the good.
But we could try harder to leave certain things the way we found them.
Consider these options, which we inject into to-be-(re)prexed code:
Lines 131 to 141 in 318363c
prex()
could note the original values of keep.source
, rlang_backtrace_on_error_report
, and crayon.enabled
and make a point of scheduling their restoration.
Jennifer (Jenny) Bryan commented