You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I kind of wonder if we want a different name, though -- those environment variables are set for specific kinds of R child processes, not for all of them. (In other words, RStudio might run some R processes where isChildProcess() would return FALSE just because it didn't go through that particular code path for launching R.)
Activity
romainfrancois commentedon Jan 7, 2022
Perhaps using these environment variables:
https://github.com/rstudio/rstudio/blob/d39088c5be134078cef0fdf85006f551360fb38a/src/cpp/session/SessionAsyncRProcess.cpp#L171
I'm not sure where the function would live though.
romainfrancois commentedon Jan 7, 2022
That's what
cliuses: https://github.com/r-lib/cli/blob/b1ea6657feaa2a368dd7a57663c887ffb679deb4/R/rstudio-detect.R#L98hadley commentedon Jan 7, 2022
Maybe rstudioapi?
kevinushey commentedon Jan 7, 2022
An identical function lives in
rstudioapi-- maybe we should export it?rstudioapi/R/remote.R
Lines 2 to 4 in 96fad1d
kevinushey commentedon Jan 7, 2022
I kind of wonder if we want a different name, though -- those environment variables are set for specific kinds of R child processes, not for all of them. (In other words, RStudio might run some R processes where
isChildProcess()would returnFALSEjust because it didn't go through that particular code path for launching R.)romainfrancois commentedon Jan 10, 2022
isJob()perhaps ?