diff --git a/dist/index.js b/dist/index.js index 8eb9778..74c9c1a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -8680,7 +8680,7 @@ function run() { core.debug('No version found, trying to find version from global.json'); const globalJsonPath = path.join(process.cwd(), 'global.json'); if (fs.existsSync(globalJsonPath)) { - versions[0] = getVersionFromGlobalJson(globalJsonPath); + versions.push(getVersionFromGlobalJson(globalJsonPath)); } } if (versions.length) { diff --git a/src/setup-dotnet.ts b/src/setup-dotnet.ts index 527f54d..f82bb14 100644 --- a/src/setup-dotnet.ts +++ b/src/setup-dotnet.ts @@ -19,7 +19,7 @@ export async function run() { core.debug('No version found, trying to find version from global.json'); const globalJsonPath = path.join(process.cwd(), 'global.json'); if (fs.existsSync(globalJsonPath)) { - versions[0] = getVersionFromGlobalJson(globalJsonPath); + versions.push(getVersionFromGlobalJson(globalJsonPath)); } }