async function getOsContext() {
  const platformId = os.platform();
  switch (platformId) {
    case 'darwin':
      return getDarwinInfo();
    case 'linux':
      return getLinuxInfo();
    default:
      return {
        name: PLATFORM_NAMES[platformId] || platformId,
        version: os.release(),
      };
  }
}
Returns the operating system context.

Based on the current platform, this uses a different strategy to provide the
most accurate OS information. Since this might involve spawning subprocesses
or accessing the file system, this should only be executed lazily and cached.

 - On macOS (Darwin), this will execute the `sw_vers` utility. The context
   has a `name`, `version`, `build` and `kernel_version` set.
 - On Linux, this will try to load a distribution release from `/etc` and set
   the `name`, `version` and `kernel_version` fields.
 - On all other platforms, only a `name` and `version` will be returned. Note
   that `version` might actually be the kernel version.