mirror of
https://github.com/peaceiris/actions-hugo.git
synced 2025-06-18 01:55:29 +08:00
13 lines
278 B
TypeScript
13 lines
278 B
TypeScript
export default function getOS(platform: string): string {
|
|
switch (platform) {
|
|
case 'linux':
|
|
return 'linux';
|
|
case 'darwin':
|
|
return 'darwin';
|
|
case 'win32':
|
|
return 'windows';
|
|
default:
|
|
throw new Error(`${platform} is not supported`);
|
|
}
|
|
}
|