From 7c495956c6ea279c08f03c0a11cb9c71d2e38bf3 Mon Sep 17 00:00:00 2001 From: IvanZosimov Date: Tue, 16 Aug 2022 19:44:57 +0200 Subject: [PATCH] Fix bug with empty line argument --- dist/index.js | 3 ++- src/installer.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 28dc050..46a8631 100644 --- a/dist/index.js +++ b/dist/index.js @@ -280,7 +280,7 @@ class DotnetCoreInstaller { let command = `& '${escapedScript}'`; command += ` ${versionObject.type} ${versionObject.value}`; if (this.quality) { - command += `${this.resolveQuality(versionObject).type} ${this.resolveQuality(versionObject).value}`; + command += ` ${this.resolveQuality(versionObject).type} ${this.resolveQuality(versionObject).value}`; } if (process.env['https_proxy'] != null) { command += ` -ProxyAddress ${process.env['https_proxy']}`; @@ -350,6 +350,7 @@ class DotnetCoreInstaller { } else { core.warning("Input 'dotnet-quality' can't be used with the specified exact version of .NET. 'dotnet-quality' input will be ignored."); + this.quality = ""; } return resolvedArgument; } diff --git a/src/installer.ts b/src/installer.ts index ad40050..d832f67 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -116,7 +116,7 @@ export class DotnetCoreInstaller { command += ` ${versionObject.type} ${versionObject.value}`; if (this.quality) { - command += `${this.resolveQuality(versionObject).type} ${ + command += ` ${this.resolveQuality(versionObject).type} ${ this.resolveQuality(versionObject).value }`; } @@ -209,6 +209,7 @@ export class DotnetCoreInstaller { core.warning( "Input 'dotnet-quality' can't be used with the specified exact version of .NET. 'dotnet-quality' input will be ignored." ); + this.quality = ""; } return resolvedArgument; }