You've already forked setup-dotnet
mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-08-03 20:25:29 +07:00
Change PLATFORM to constant instead of function
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
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';
|
||||
export const PLATFORM = ((): 'windows' | 'linux' | 'mac' => {
|
||||
if (process.platform === 'win32') return 'windows';
|
||||
if (process.platform === 'linux') return 'linux';
|
||||
return 'mac';
|
||||
};
|
||||
})();
|
||||
|
Reference in New Issue
Block a user