From dd8accf3a7714d55ba99df764fbcefb3a38a0d2f Mon Sep 17 00:00:00 2001 From: IvanZosimov Date: Tue, 16 Aug 2022 19:22:46 +0200 Subject: [PATCH] Fix error message --- dist/index.js | 2 +- src/installer.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 9b59115..82dc552 100644 --- a/dist/index.js +++ b/dist/index.js @@ -215,7 +215,7 @@ class DotnetVersionResolver { const ValidatingRegEx = /^\d+.\d+/i; const ReplacingRegEx = /^(\d+.\d+).[x/*]$/i; if (!ValidatingRegEx.test(this.inputVersion)) { - throw new Error('Invalid version format! Supported: A.B.C, A.B.C-D, A.B, A.B.x, A.B.X, A.B.*'); + throw new Error(`dotnet-version was supplied in invalid format: ${this.inputVersion}! Supported: A.B.C, A.B.C-D, A.B, A.B.x, A.B.X, A.B.*`); } if (semver_1.default.valid(this.inputVersion)) { this.resolvedArgument.type = 'version'; diff --git a/src/installer.ts b/src/installer.ts index d7e7105..3fa23da 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -45,7 +45,7 @@ export class DotnetVersionResolver { const ReplacingRegEx = /^(\d+.\d+).[x/*]$/i; if (!ValidatingRegEx.test(this.inputVersion)) { throw new Error( - 'Invalid version format! Supported: A.B.C, A.B.C-D, A.B, A.B.x, A.B.X, A.B.*' + `dotnet-version was supplied in invalid format: ${this.inputVersion}! Supported: A.B.C, A.B.C-D, A.B, A.B.x, A.B.X, A.B.*` ); } if (semver.valid(this.inputVersion)) {