restartSession() function "command" argument not executing

I am having trouble getting the restartSession() function from the rstudioapi package to work properly. Several people on this github thread also seem to be having a similar issue.

I was using restartSession() to keep running certain while loops over and over until a certain condition was met, and it worked for a while. However, out of the blue the function no longer seems to act on the command argument. Here is a simplified example to illustrate the issue that is bothering me. Previously running the line


would restart my session and then print "Hello" to the console. Now, however, running that exact same line of code will restart my session, but it will not print "Hello" any more. I have rebooted my computer and shut down R Studio, and nothing seems to fix the issue. I've tried a number of different "command" arguments as well. The restartSession() function no longer seems to call any command.

Does anyone know how to get the function working properly again?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.