You've already forked setup-dotnet
mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-09-15 09:14:18 +07:00
Fix errors + Update generated files
This commit is contained in:
12
dist/index.js
vendored
12
dist/index.js
vendored
@ -275,9 +275,10 @@ class DotnetVersionResolver {
|
||||
exports.DotnetVersionResolver = DotnetVersionResolver;
|
||||
DotnetVersionResolver.DotNetCoreIndexUrl = 'https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json';
|
||||
class DotnetCoreInstaller {
|
||||
constructor(version, quality) {
|
||||
constructor(version, quality, architecture = '') {
|
||||
this.version = version;
|
||||
this.quality = quality;
|
||||
this.architecture = architecture;
|
||||
}
|
||||
static convertInstallPathToAbsolute(installDir) {
|
||||
let transformedPath;
|
||||
@ -352,6 +353,9 @@ class DotnetCoreInstaller {
|
||||
if (this.quality) {
|
||||
this.setQuality(dotnetVersion, scriptArguments);
|
||||
}
|
||||
if (this.architecture != '') {
|
||||
scriptArguments.push('--architecture', this.architecture);
|
||||
}
|
||||
}
|
||||
// process.env must be explicitly passed in for DOTNET_INSTALL_DIR to be used
|
||||
const getExecOutputOptions = {
|
||||
@ -471,6 +475,10 @@ function run() {
|
||||
//
|
||||
const versions = core.getMultilineInput('dotnet-version');
|
||||
const installedDotnetVersions = [];
|
||||
let architecture = core.getInput('architecture');
|
||||
if (!architecture) {
|
||||
architecture = '';
|
||||
}
|
||||
const globalJsonFileInput = core.getInput('global-json-file');
|
||||
if (globalJsonFileInput) {
|
||||
const globalJsonPath = path_1.default.join(process.cwd(), globalJsonFileInput);
|
||||
@ -495,7 +503,7 @@ function run() {
|
||||
let dotnetInstaller;
|
||||
const uniqueVersions = new Set(versions);
|
||||
for (const version of uniqueVersions) {
|
||||
dotnetInstaller = new installer_1.DotnetCoreInstaller(version, quality);
|
||||
dotnetInstaller = new installer_1.DotnetCoreInstaller(version, quality, architecture);
|
||||
const installedVersion = yield dotnetInstaller.installDotnet();
|
||||
installedDotnetVersions.push(installedVersion);
|
||||
}
|
||||
|
Reference in New Issue
Block a user