Skip to content

Commit

Permalink
Rename initialize to setEnvironmentVariable
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolai Laevskii committed May 30, 2023
1 parent 916aec4 commit defac24
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 {
Expand Down Expand Up @@ -465,7 +465,7 @@ class DotnetCoreInstaller {
exports.DotnetCoreInstaller = DotnetCoreInstaller;
DotnetCoreInstaller.addToPath = DotnetInstallDir.addToPath;
(() => {
DotnetInstallDir.initialize();
DotnetInstallDir.setEnvironmentVariable();
})();


Expand Down
4 changes: 2 additions & 2 deletions src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand All @@ -249,7 +249,7 @@ export class DotnetCoreInstaller {
static addToPath = DotnetInstallDir.addToPath;

static {
DotnetInstallDir.initialize();
DotnetInstallDir.setEnvironmentVariable();
}

constructor(private version: string, private quality: QualityOptions) {}
Expand Down

0 comments on commit defac24

Please sign in to comment.