Rename initialize to setEnvironmentVariable

This commit is contained in:
Nikolai Laevskii 2023-05-30 12:18:10 +02:00
parent 916aec40c9
commit defac2491f
2 changed files with 6 additions and 6 deletions

8
dist/index.js vendored
View File

@ -420,8 +420,8 @@ class DotnetInstallDir {
core.addPath(process.env['DOTNET_INSTALL_DIR']);
core.exportVariable('DOTNET_ROOT', process.env['DOTNET_INSTALL_DIR']);
}
static initialize() {
process.env['DOTNET_INSTALL_DIR'] = DotnetInstallDir.path;
static setEnvironmentVariable() {
process.env['DOTNET_INSTALL_DIR'] = DotnetInstallDir.dirPath;
}
}
exports.DotnetInstallDir = DotnetInstallDir;
@ -430,7 +430,7 @@ DotnetInstallDir.default = {
mac: path_1.default.join(process.env['HOME'] + '', '.dotnet'),
windows: path_1.default.join(process.env['PROGRAMFILES'] + '', 'dotnet')
};
DotnetInstallDir.path = process.env['DOTNET_INSTALL_DIR']
DotnetInstallDir.dirPath = process.env['DOTNET_INSTALL_DIR']
? DotnetInstallDir.convertInstallPathToAbsolute(process.env['DOTNET_INSTALL_DIR'])
: DotnetInstallDir.default[utils_1.PLATFORM];
class DotnetCoreInstaller {
@ -465,7 +465,7 @@ class DotnetCoreInstaller {
exports.DotnetCoreInstaller = DotnetCoreInstaller;
DotnetCoreInstaller.addToPath = DotnetInstallDir.addToPath;
(() => {
DotnetInstallDir.initialize();
DotnetInstallDir.setEnvironmentVariable();
})();

View File

@ -240,7 +240,7 @@ export abstract class DotnetInstallDir {
core.exportVariable('DOTNET_ROOT', process.env['DOTNET_INSTALL_DIR']);
}
public static initialize() {
public static setEnvironmentVariable() {
process.env['DOTNET_INSTALL_DIR'] = DotnetInstallDir.dirPath;
}
}
@ -249,7 +249,7 @@ export class DotnetCoreInstaller {
static addToPath = DotnetInstallDir.addToPath;
static {
DotnetInstallDir.initialize();
DotnetInstallDir.setEnvironmentVariable();
}
constructor(private version: string, private quality: QualityOptions) {}