peaceiris/actions-hugo

View on GitHub
src/get-os.ts

Summary

Maintainability
A
1 hr
Test Coverage
Similar blocks of code found in 2 locations. Consider refactoring.
export default function getOS(platform: string): string {
switch (platform) {
case 'linux':
return 'Linux';
case 'darwin':
return 'macOS';
case 'win32':
return 'Windows';
default:
throw new Error(`${platform} is not supported`);
}
}