actions-hugo/src/get-os.ts
Shohei Ueda 386980e22b
test: Add integration testing (#131)
* docs: Update description
* deps: Add nock
* chore: Add resolveJsonModule
* test: Add integration testing
* chore: Add @typescript-eslint/eslint-plugin
* refactor: Fix lint errors
* chore: Add eslint-plugin-jest
* refactor: Fix lint errors
* test: Add remove working files
* ci: Comment out cache steps
2020-01-18 10:29:06 +09:00

11 lines
295 B
TypeScript

export default function getOS(platform: string): string {
if (platform === 'linux') {
return 'Linux';
} else if (platform === 'darwin') {
return 'macOS';
} else if (platform === 'win32') {
return 'Windows';
} else {
throw new Error(`${platform} is not supported`);
}
}