| // Copyright 2025 The Chromium Authors | |
| // Use of this source code is governed by a BSD-style license that can be | |
| // found in the LICENSE file. | |
| import * as os from 'node:os'; | |
| export type Platform = 'mac'|'win32'|'linux'; | |
| export let platform: Platform; | |
| switch (os.platform()) { | |
| case 'darwin': | |
| platform = 'mac'; | |
| break; | |
| case 'win32': | |
| platform = 'win32'; | |
| break; | |
| default: | |
| platform = 'linux'; | |
| break; | |
| } |