mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-08-23 09:00:18 +00:00
Fix error message
This commit is contained in:
parent
bdf4b09d47
commit
dd8accf3a7
2
dist/index.js
vendored
2
dist/index.js
vendored
@ -215,7 +215,7 @@ class DotnetVersionResolver {
|
|||||||
const ValidatingRegEx = /^\d+.\d+/i;
|
const ValidatingRegEx = /^\d+.\d+/i;
|
||||||
const ReplacingRegEx = /^(\d+.\d+).[x/*]$/i;
|
const ReplacingRegEx = /^(\d+.\d+).[x/*]$/i;
|
||||||
if (!ValidatingRegEx.test(this.inputVersion)) {
|
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)) {
|
if (semver_1.default.valid(this.inputVersion)) {
|
||||||
this.resolvedArgument.type = 'version';
|
this.resolvedArgument.type = 'version';
|
||||||
|
@ -45,7 +45,7 @@ export class DotnetVersionResolver {
|
|||||||
const ReplacingRegEx = /^(\d+.\d+).[x/*]$/i;
|
const ReplacingRegEx = /^(\d+.\d+).[x/*]$/i;
|
||||||
if (!ValidatingRegEx.test(this.inputVersion)) {
|
if (!ValidatingRegEx.test(this.inputVersion)) {
|
||||||
throw new Error(
|
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)) {
|
if (semver.valid(this.inputVersion)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user