diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 9ee782a..17f57dd 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -33,6 +33,26 @@ jobs: if: runner.os != 'windows' run: __tests__/verify-no-unstaged-changes.sh +test-setup-multiple-versions: + runs-on: ${{ matrix.operating-system }} + strategy: + fail-fast: false + matrix: + operating-system: [ubuntu-latest, windows-latest, macOS-latest] + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Clear toolcache + shell: pwsh + run: __tests__/clear-toolcache.ps1 ${{ runner.os }} + - name: Setup dotnet 2.2.402 + uses: ./ + with: + dotnet-version: '2.2.402 , 3.1.404 , 5.0.100' + - name: Verify dotnet + shell: pwsh + run: __tests__/verify-dotnet.ps1 ru + test-setup-full-version: runs-on: ${{ matrix.operating-system }} strategy: diff --git a/dist/index.js b/dist/index.js index a37c94e..dc6b160 100644 --- a/dist/index.js +++ b/dist/index.js @@ -16955,8 +16955,8 @@ class DotnetCoreInstaller { return __awaiter(this, void 0, void 0, function* () { let output = ''; let resultCode = 0; - if (this.version.includes(",")) { - this.versions = this.version.split(","); + if (this.version.includes(',')) { + this.versions = this.version.split(','); } else { this.versions.push(this.version); @@ -16964,7 +16964,7 @@ class DotnetCoreInstaller { try { for (var _b = __asyncValues(this.versions), _c; _c = yield _b.next(), !_c.done;) { const version = _c.value; - let calculatedVersion = yield this.resolveVersion(new DotNetVersionInfo(this.version)); + let calculatedVersion = yield this.resolveVersion(new DotNetVersionInfo(version)); var envVariables = {}; for (let key in process.env) { if (process.env[key]) { diff --git a/src/installer.ts b/src/installer.ts index cb67611..58dc0b5 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -96,7 +96,7 @@ export class DotnetCoreInstaller { for await (const version of this.versions) { let calculatedVersion = await this.resolveVersion( - new DotNetVersionInfo(this.version) + new DotNetVersionInfo(version) ); var envVariables: {[key: string]: string} = {};