Skip to content

Commit

Permalink
Merge pull request #588 from pishro-cc/master
Browse files Browse the repository at this point in the history
better error reporting with feeded curl data is not enclosed.
  • Loading branch information
camelpunch committed Sep 28, 2015
2 parents 584aeac + 12178c7 commit 4d5fe31
Show file tree
Hide file tree
Showing 11 changed files with 47 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cf/commands/curl.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (cmd *Curl) MetaData() command_registry.CommandMetadata {

func (cmd *Curl) Requirements(requirementsFactory requirements.Factory, fc flags.FlagContext) (reqs []requirements.Requirement, err error) {
if len(fc.Args()) != 1 {
cmd.ui.Failed(T("Incorrect Usage. Requires an argument\n\n") + command_registry.Commands.CommandUsage("curl"))
cmd.ui.Failed(T("Incorrect Usage. An argument is missing or not correctly enclosed.\n\n") + command_registry.Commands.CommandUsage("curl"))
}

reqs = []requirements.Requirement{
Expand Down
2 changes: 1 addition & 1 deletion cf/commands/curl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ var _ = Describe("curl command", func() {
It("fails with usage when not given enough input", func() {
runCurlWithInputs([]string{})
Expect(ui.Outputs).To(ContainSubstrings(
[]string{"Incorrect Usage", "Requires an argument"},
[]string{"Incorrect Usage", "An argument is missing or not correctly enclosed"},
))
})

Expand Down
5 changes: 5 additions & 0 deletions cf/i18n/resources/de_DE.all.json
Original file line number Diff line number Diff line change
Expand Up @@ -2764,6 +2764,11 @@
"translation": "Incorrect Usage. Requires an argument\n\n",
"modified": false
},
{
"id": "Incorrect Usage. An argument is missing or not correctly enclosed.\n\n",
"translation": "Incorrect Usage. An argument is missing or not correctly enclosed.\n\n",
"modified": false
},
{
"id": "Incorrect Usage. Requires app name as argument\n\n",
"translation": "Incorrect Usage. Requires app name as argument\n\n",
Expand Down
5 changes: 5 additions & 0 deletions cf/i18n/resources/en_US.all.json
Original file line number Diff line number Diff line change
Expand Up @@ -2764,6 +2764,11 @@
"translation": "Incorrect Usage. Requires an argument\n\n",
"modified": false
},
{
"id": "Incorrect Usage. An argument is missing or not correctly enclosed.\n\n",
"translation": "Incorrect Usage. An argument is missing or not correctly enclosed.\n\n",
"modified": false
},
{
"id": "Incorrect Usage. Requires app name as argument\n\n",
"translation": "Incorrect Usage. Requires app name as argument\n\n",
Expand Down
5 changes: 5 additions & 0 deletions cf/i18n/resources/es_ES.all.json
Original file line number Diff line number Diff line change
Expand Up @@ -2779,6 +2779,11 @@
"translation": "Incorrect Usage. Requires arguments\n\n",
"modified": false
},
{
"id": "Incorrect Usage. An argument is missing or not correctly enclosed.\n\n",
"translation": "Incorrect Usage. An argument is missing or not correctly enclosed.\n\n",
"modified": false
},
{
"id": "Incorrect Usage. Requires buildpack_name, path and position as arguments\n\n",
"translation": "Incorrect Usage. Requires buildpack_name, path and position as arguments\n\n",
Expand Down
5 changes: 5 additions & 0 deletions cf/i18n/resources/fr_FR.all.json
Original file line number Diff line number Diff line change
Expand Up @@ -2764,6 +2764,11 @@
"translation": "Incorrect Usage. Requires an argument\n\n",
"modified": false
},
{
"id": "Incorrect Usage. An argument is missing or not correctly enclosed.\n\n",
"translation": "Incorrect Usage. An argument is missing or not correctly enclosed.\n\n",
"modified": false
},
{
"id": "Incorrect Usage. Requires app name as argument\n\n",
"translation": "Incorrect Usage. Requires app name as argument\n\n",
Expand Down
5 changes: 5 additions & 0 deletions cf/i18n/resources/it_IT.all.json
Original file line number Diff line number Diff line change
Expand Up @@ -2764,6 +2764,11 @@
"translation": "Incorrect Usage. Requires an argument\n\n",
"modified": false
},
{
"id": "Incorrect Usage. An argument is missing or not correctly enclosed.\n\n",
"translation": "Incorrect Usage. An argument is missing or not correctly enclosed.\n\n",
"modified": false
},
{
"id": "Incorrect Usage. Requires app name as argument\n\n",
"translation": "Incorrect Usage. Requires app name as argument\n\n",
Expand Down
5 changes: 5 additions & 0 deletions cf/i18n/resources/ja_JA.all.json
Original file line number Diff line number Diff line change
Expand Up @@ -2764,6 +2764,11 @@
"translation": "Incorrect Usage. Requires an argument\n\n",
"modified": false
},
{
"id": "Incorrect Usage. An argument is missing or not correctly enclosed.\n\n",
"translation": "Incorrect Usage. An argument is missing or not correctly enclosed.\n\n",
"modified": false
},
{
"id": "Incorrect Usage. Requires app name as argument\n\n",
"translation": "Incorrect Usage. Requires app name as argument\n\n",
Expand Down
5 changes: 5 additions & 0 deletions cf/i18n/resources/pt_BR.all.json
Original file line number Diff line number Diff line change
Expand Up @@ -2764,6 +2764,11 @@
"translation": "Incorrect Usage. Requires an argument\n\n",
"modified": false
},
{
"id": "Incorrect Usage. An argument is missing or not correctly enclosed.\n\n",
"translation": "Incorrect Usage. An argument is missing or not correctly enclosed.\n\n",
"modified": false
},
{
"id": "Incorrect Usage. Requires app name as argument\n\n",
"translation": "Incorrect Usage. Requires app name as argument\n\n",
Expand Down
5 changes: 5 additions & 0 deletions cf/i18n/resources/zh_Hans.all.json
Original file line number Diff line number Diff line change
Expand Up @@ -2764,6 +2764,11 @@
"translation": "Incorrect Usage. Requires an argument\n\n",
"modified": false
},
{
"id": "Incorrect Usage. An argument is missing or not correctly enclosed.\n\n",
"translation": "Incorrect Usage. An argument is missing or not correctly enclosed.\n\n",
"modified": false
},
{
"id": "Incorrect Usage. Requires app name as argument\n\n",
"translation": "Incorrect Usage. Requires app name as argument\n\n",
Expand Down
5 changes: 5 additions & 0 deletions cf/i18n/resources/zh_Hant.all.json
Original file line number Diff line number Diff line change
Expand Up @@ -2764,6 +2764,11 @@
"translation": "Incorrect Usage. Requires an argument\n\n",
"modified": false
},
{
"id": "Incorrect Usage. An argument is missing or not correctly enclosed.\n\n",
"translation": "Incorrect Usage. An argument is missing or not correctly enclosed.\n\n",
"modified": false
},
{
"id": "Incorrect Usage. Requires app name as argument\n\n",
"translation": "Incorrect Usage. Requires app name as argument\n\n",
Expand Down

0 comments on commit 4d5fe31

Please sign in to comment.