How to reboot SketchUp?

This works for Windows. I’m not sure how to do this on Mac.

Process.spawn("SketchUp.exe")
Sketchup.quit

Quirks:

  1. This starts the default version of SketchUp if more than one version is installed.
  2. In SketchUp 2022 the quit is executed to soon and SketchUp is not restarted.

Also see here.