mirror of
https://github.com/actions/setup-dotnet.git
synced 2024-11-22 19:41:08 +07:00
Rename initialize to setEnvironmentVariable
This commit is contained in:
parent
916aec40c9
commit
defac2491f
8
dist/index.js
vendored
8
dist/index.js
vendored
@ -420,8 +420,8 @@ class DotnetInstallDir {
|
|||||||
core.addPath(process.env['DOTNET_INSTALL_DIR']);
|
core.addPath(process.env['DOTNET_INSTALL_DIR']);
|
||||||
core.exportVariable('DOTNET_ROOT', process.env['DOTNET_INSTALL_DIR']);
|
core.exportVariable('DOTNET_ROOT', process.env['DOTNET_INSTALL_DIR']);
|
||||||
}
|
}
|
||||||
static initialize() {
|
static setEnvironmentVariable() {
|
||||||
process.env['DOTNET_INSTALL_DIR'] = DotnetInstallDir.path;
|
process.env['DOTNET_INSTALL_DIR'] = DotnetInstallDir.dirPath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.DotnetInstallDir = DotnetInstallDir;
|
exports.DotnetInstallDir = DotnetInstallDir;
|
||||||
@ -430,7 +430,7 @@ DotnetInstallDir.default = {
|
|||||||
mac: path_1.default.join(process.env['HOME'] + '', '.dotnet'),
|
mac: path_1.default.join(process.env['HOME'] + '', '.dotnet'),
|
||||||
windows: path_1.default.join(process.env['PROGRAMFILES'] + '', '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.convertInstallPathToAbsolute(process.env['DOTNET_INSTALL_DIR'])
|
||||||
: DotnetInstallDir.default[utils_1.PLATFORM];
|
: DotnetInstallDir.default[utils_1.PLATFORM];
|
||||||
class DotnetCoreInstaller {
|
class DotnetCoreInstaller {
|
||||||
@ -465,7 +465,7 @@ class DotnetCoreInstaller {
|
|||||||
exports.DotnetCoreInstaller = DotnetCoreInstaller;
|
exports.DotnetCoreInstaller = DotnetCoreInstaller;
|
||||||
DotnetCoreInstaller.addToPath = DotnetInstallDir.addToPath;
|
DotnetCoreInstaller.addToPath = DotnetInstallDir.addToPath;
|
||||||
(() => {
|
(() => {
|
||||||
DotnetInstallDir.initialize();
|
DotnetInstallDir.setEnvironmentVariable();
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
||||||
|
@ -240,7 +240,7 @@ export abstract class DotnetInstallDir {
|
|||||||
core.exportVariable('DOTNET_ROOT', process.env['DOTNET_INSTALL_DIR']);
|
core.exportVariable('DOTNET_ROOT', process.env['DOTNET_INSTALL_DIR']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static initialize() {
|
public static setEnvironmentVariable() {
|
||||||
process.env['DOTNET_INSTALL_DIR'] = DotnetInstallDir.dirPath;
|
process.env['DOTNET_INSTALL_DIR'] = DotnetInstallDir.dirPath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -249,7 +249,7 @@ export class DotnetCoreInstaller {
|
|||||||
static addToPath = DotnetInstallDir.addToPath;
|
static addToPath = DotnetInstallDir.addToPath;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
DotnetInstallDir.initialize();
|
DotnetInstallDir.setEnvironmentVariable();
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(private version: string, private quality: QualityOptions) {}
|
constructor(private version: string, private quality: QualityOptions) {}
|
||||||
|
Loading…
Reference in New Issue
Block a user