diff --git a/dist/index.js b/dist/index.js index 32c22ca..d6b7f30 100644 --- a/dist/index.js +++ b/dist/index.js @@ -280,8 +280,13 @@ class DotnetCoreInstaller { .replace(/'/g, "''"); let command = `& '${escapedScript}'`; command += ` ${versionObject.type} ${versionObject.value}`; - if (this.quality && versionObject.qualityFlag) { - command += ` -Quality ${this.quality}`; + if (this.quality) { + if (versionObject.qualityFlag) { + command += ` -Quality ${this.quality}`; + } + else { + core.warning("'dotnet-quality' input can't be used with exact version of .NET. 'dotnet-quality' input is ignored."); + } } if (process.env['https_proxy'] != null) { command += ` -ProxyAddress ${process.env['https_proxy']}`; @@ -320,8 +325,13 @@ class DotnetCoreInstaller { const scriptPath = yield io.which(escapedScript, true); let scriptArguments = []; scriptArguments.push(versionObject.type, versionObject.value); - if (this.quality && versionObject.qualityFlag) { - scriptArguments.push("--quality", this.quality); + if (this.quality) { + if (versionObject.qualityFlag) { + scriptArguments.push("--quality", this.quality); + } + else { + core.warning("'dotnet-quality' input can't be used with exact version of .NET. 'dotnet-quality' input is ignored."); + } } if (IS_LINUX) { scriptArguments.push('--install-dir', installationDirectoryLinux); diff --git a/src/installer.ts b/src/installer.ts index e4f3685..6a68cda 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -116,10 +116,14 @@ export class DotnetCoreInstaller { command += ` ${versionObject.type} ${versionObject.value}`; - if (this.quality && versionObject.qualityFlag) { - command += ` -Quality ${this.quality}`; + if (this.quality) { + if (versionObject.qualityFlag) { + command += ` -Quality ${this.quality}`; + } else { + core.warning("'dotnet-quality' input can't be used with exact version of .NET. 'dotnet-quality' input is ignored."); + } } - + if (process.env['https_proxy'] != null) { command += ` -ProxyAddress ${process.env['https_proxy']}`; } @@ -168,8 +172,12 @@ export class DotnetCoreInstaller { scriptArguments.push(versionObject.type, versionObject.value); - if (this.quality && versionObject.qualityFlag) { - scriptArguments.push("--quality", this.quality); + if (this.quality) { + if (versionObject.qualityFlag){ + scriptArguments.push("--quality", this.quality); + } else { + core.warning("'dotnet-quality' input can't be used with exact version of .NET. 'dotnet-quality' input is ignored."); + } } if (IS_LINUX) {