actions-hugo/lib/get-os.js

15 lines
341 B
JavaScript
Raw Normal View History

2019-09-18 09:59:07 +09:00
function getOS(platform) {
if (platform === "linux") {
return "Linux";
} else if (platform === "darwin") {
return "macOS";
} else if (platform === "win32") {
2019-09-18 10:39:24 +09:00
return "Windows";
// throw new Error("Windows is not supported");
2019-09-18 09:59:07 +09:00
} else {
throw new Error(`${platform} is not supported`);
}
}
module.exports = getOS;