1
0
mirror of https://github.com/actions/setup-dotnet.git synced 2026-02-18 23:41:19 +01:00

Refactor install dir computation

This commit is contained in:
Nikolai Laevskii
2023-05-12 14:07:46 +02:00
parent dd32dd730c
commit 6d92b9bd53
3 changed files with 35 additions and 43 deletions

View File

@@ -1,2 +1,7 @@
export const IS_WINDOWS = process.platform === 'win32';
export const IS_LINUX = process.platform === 'linux';
export const getPlatform = (): 'windows' | 'linux' | 'mac' => {
if (IS_WINDOWS) return 'windows';
if (IS_LINUX) return 'linux';
return 'mac';
};