Build the restart command that performs an extension update
Source:R/extension_updates.R
build_update_restart_command.RdConstructs the string passed to rstudioapi::restartSession(command = ...).
The command, when executed in a fresh R session:
Prints an "Updating..." banner via
update_intro_message().Calls the extension's
ntrd_update_extension()insidetryCatch, bindingoktoTRUEon success orFALSEon failure. The error is surfaced viamessage().Queues a second
restartSession()whose command callsupdate_finalize()with the resultingokflag and the package name. That second restart lands in a fresh session at an idle R prompt, with a styled status message and instructions to relaunch the dashboard.
Value
A character string suitable for rstudioapi::restartSession()'s
command argument.
Details
The user-facing messages live in update_intro_message(),
update_success_message(), update_failure_message(), and the
update_finalize() dispatcher — keeping this function focused on
orchestration rather than copy.