Skip to content

Commit

Permalink
Corrects missing parentheses in MSBuild parameter validation (#11946)
Browse files Browse the repository at this point in the history
* The "isMatch" expression for the newly-added platform and configuration
validation was missing a close-parenthesis.

* Mirrored changes to task.json, and bumped task patch version.

* The same issue also applied to VSBuildV1.

* Remove validation in the UI entirely to unblock. Parameters to MSBuild will
still be validated at run-time.

* Smoothing out patch version number.
  • Loading branch information
wireznak authored and leantk committed Dec 23, 2019
1 parent 9e40275 commit 940f704
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 35 deletions.
14 changes: 3 additions & 11 deletions Tasks/MSBuildV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": 1,
"Minor": 161,
"Patch": 0
"Patch": 1
},
"demands": [
"msbuild"
Expand Down Expand Up @@ -90,22 +90,14 @@
"type": "string",
"label": "Platform",
"defaultValue": "",
"required": false,
"validation": {
"expression": "isMatch(value, '[<>*|:\\/&%\".#?]'",
"message": "The following characters are forbidden in Platform: < > * | : \\ / & % \" . # ?"
}
"required": false
},
{
"name": "configuration",
"type": "string",
"label": "Configuration",
"defaultValue": "",
"required": false,
"validation": {
"expression": "isMatch(value, '[<>*|:\\/&%\".#?]'",
"message": "The following characters are forbidden in Configuration: < > * | : \\ / & % \" . # ?"
}
"required": false
},
{
"name": "msbuildArguments",
Expand Down
14 changes: 3 additions & 11 deletions Tasks/MSBuildV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": 1,
"Minor": 161,
"Patch": 0
"Patch": 1
},
"demands": [
"msbuild"
Expand Down Expand Up @@ -90,22 +90,14 @@
"type": "string",
"label": "ms-resource:loc.input.label.platform",
"defaultValue": "",
"required": false,
"validation": {
"expression": "isMatch(value, '[<>*|:\\/&%\".#?]'",
"message": "The following characters are forbidden in Platform: < > * | : \\ / & % \" . # ?"
}
"required": false
},
{
"name": "configuration",
"type": "string",
"label": "ms-resource:loc.input.label.configuration",
"defaultValue": "",
"required": false,
"validation": {
"expression": "isMatch(value, '[<>*|:\\/&%\".#?]'",
"message": "The following characters are forbidden in Configuration: < > * | : \\ / & % \" . # ?"
}
"required": false
},
{
"name": "msbuildArguments",
Expand Down
14 changes: 3 additions & 11 deletions Tasks/VSBuildV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": 1,
"Minor": 161,
"Patch": 0
"Patch": 1
},
"demands": [
"msbuild",
Expand Down Expand Up @@ -66,23 +66,15 @@
"label": "Platform",
"helpMarkDown": "Specify the platform you want to build such as Win32, x86, x64 or any cpu.",
"defaultValue": "",
"required": false,
"validation": {
"expression": "isMatch(value, '[<>*|:\\/&%\".#?]'",
"message": "The following characters are forbidden in Platform: < > * | : \\ / & % \" . # ?"
}
"required": false
},
{
"name": "configuration",
"type": "string",
"label": "Configuration",
"helpMarkDown": "Specify the configuration you want to build such as debug or release.",
"defaultValue": "",
"required": false,
"validation": {
"expression": "isMatch(value, '[<>*|:\\/&%\".#?]'",
"message": "The following characters are forbidden in Configuration: < > * | : \\ / & % \" . # ?"
}
"required": false
},
{
"name": "clean",
Expand Down
4 changes: 2 additions & 2 deletions Tasks/VSBuildV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 160,
"Patch": 0
"Minor": 161,
"Patch": 1
},
"demands": [
"msbuild",
Expand Down

0 comments on commit 940f704

Please sign in to comment.