Change PLATFORM to constant instead of function

This commit is contained in:
Nikolai Laevskii committed 2023-05-25 13:11:13 +02:00
1 parent eb0b7f8852
commit 80a318b8b8
2 files changed
+6 -7

No files matched your search

+2 -2
View File
@@ -7,7 +7,7 @@ import {chmodSync} from 'fs';
import path from 'path';
import os from 'os';
import semver from 'semver';
import {IS_WINDOWS, getPlatform} from './utils';
import {IS_WINDOWS, PLATFORM} from './utils';
import {QualityOptions} from './setup-dotnet';
export interface DotnetVersion {
@@ -223,7 +223,7 @@ export abstract class DotnetInstallDir {
? DotnetInstallDir.convertInstallPathToAbsolute(
process.env['DOTNET_INSTALL_DIR']
)
: DotnetInstallDir.default[getPlatform()];
: DotnetInstallDir.default[PLATFORM];
private static convertInstallPathToAbsolute(installDir: string): string {
if (path.isAbsolute(installDir)) return path.normalize(installDir);