Fix error message

This commit is contained in:
IvanZosimov 2022-08-16 19:22:46 +02:00
parent bdf4b09d47
commit dd8accf3a7
2 changed files with 2 additions and 2 deletions

2
dist/index.js vendored
View File

@ -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';

View File

@ -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)) {