diff --git a/cf/commands/service/bind_service.go b/cf/commands/service/bind_service.go index 649654e33bf..992c73c23a2 100644 --- a/cf/commands/service/bind_service.go +++ b/cf/commands/service/bind_service.go @@ -100,7 +100,7 @@ func (cmd *BindService) Run(c *cli.Context) { paramsMap, err := json.ParseJsonFromFileOrString(params) if err != nil { - cmd.ui.Failed("Invalid JSON provided in -c argument: " + err.Error()) + cmd.ui.Failed(T("Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON.")) } cmd.ui.Say(T("Binding service {{.ServiceInstanceName}} to app {{.AppName}} in org {{.OrgName}} / space {{.SpaceName}} as {{.CurrentUser}}...", diff --git a/cf/commands/service/bind_service_test.go b/cf/commands/service/bind_service_test.go index 79b869f1161..1f8f74c99bc 100644 --- a/cf/commands/service/bind_service_test.go +++ b/cf/commands/service/bind_service_test.go @@ -153,7 +153,7 @@ var _ = Describe("bind-service command", func() { Expect(ui.Outputs).To(ContainSubstrings( []string{"FAILED"}, - []string{"Invalid JSON provided in -c argument: Incorrect json format: invalid character 'b' looking for beginning of value"}, + []string{"Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON."}, )) }) }) @@ -208,7 +208,7 @@ var _ = Describe("bind-service command", func() { Expect(ui.Outputs).To(ContainSubstrings( []string{"FAILED"}, - []string{"Invalid JSON provided in -c argument"}, + []string{"Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON."}, )) }) }) diff --git a/cf/commands/service/create_service.go b/cf/commands/service/create_service.go index 0ac6d987b8c..7150163c0f5 100644 --- a/cf/commands/service/create_service.go +++ b/cf/commands/service/create_service.go @@ -92,7 +92,7 @@ func (cmd CreateService) Run(c *cli.Context) { paramsMap, err := json.ParseJsonFromFileOrString(params) if err != nil { - cmd.ui.Failed(T("Invalid JSON provided in -c argument")) + cmd.ui.Failed(T("Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON.")) } cmd.ui.Say(T("Creating service instance {{.ServiceName}} in org {{.OrgName}} / space {{.SpaceName}} as {{.CurrentUser}}...", diff --git a/cf/commands/service/create_service_test.go b/cf/commands/service/create_service_test.go index fa0a80db343..c1709fe42d9 100644 --- a/cf/commands/service/create_service_test.go +++ b/cf/commands/service/create_service_test.go @@ -116,7 +116,7 @@ var _ = Describe("create-service command", func() { Expect(ui.Outputs).To(ContainSubstrings( []string{"FAILED"}, - []string{"Invalid JSON provided in -c argument"}, + []string{"Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON."}, )) }) }) @@ -166,7 +166,7 @@ var _ = Describe("create-service command", func() { Expect(ui.Outputs).To(ContainSubstrings( []string{"FAILED"}, - []string{"Invalid JSON provided in -c argument"}, + []string{"Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON."}, )) }) }) diff --git a/cf/commands/service/update_service.go b/cf/commands/service/update_service.go index 4b791ab07a1..611de8e078d 100644 --- a/cf/commands/service/update_service.go +++ b/cf/commands/service/update_service.go @@ -91,7 +91,7 @@ func (cmd *UpdateService) Run(c *cli.Context) { params := c.String("c") paramsMap, err := json.ParseJsonFromFileOrString(params) if err != nil { - cmd.ui.Failed(T("Invalid JSON provided in -c argument")) + cmd.ui.Failed(T("Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON.")) } if planName != "" { diff --git a/cf/commands/service/update_service_test.go b/cf/commands/service/update_service_test.go index 1eef326d5ce..f8c631078da 100644 --- a/cf/commands/service/update_service_test.go +++ b/cf/commands/service/update_service_test.go @@ -153,7 +153,7 @@ var _ = Describe("update-service command", func() { Expect(ui.Outputs).To(ContainSubstrings( []string{"FAILED"}, - []string{"Invalid JSON provided in -c argument"}, + []string{"Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON."}, )) }) }) @@ -207,7 +207,7 @@ var _ = Describe("update-service command", func() { Expect(ui.Outputs).To(ContainSubstrings( []string{"FAILED"}, - []string{"Invalid JSON provided in -c argument"}, + []string{"Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON."}, )) }) }) diff --git a/cf/commands/servicekey/create_service_key.go b/cf/commands/servicekey/create_service_key.go index 5c3cc3fd3b0..1c59c08eab0 100644 --- a/cf/commands/servicekey/create_service_key.go +++ b/cf/commands/servicekey/create_service_key.go @@ -78,7 +78,7 @@ func (cmd CreateServiceKey) Run(c *cli.Context) { paramsMap, err := json.ParseJsonFromFileOrString(params) if err != nil { - cmd.ui.Failed(T("Invalid JSON provided in -c argument")) + cmd.ui.Failed(T("Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON.")) } cmd.ui.Say(T("Creating service key {{.ServiceKeyName}} for service instance {{.ServiceInstanceName}} as {{.CurrentUser}}...", diff --git a/cf/commands/servicekey/create_service_key_test.go b/cf/commands/servicekey/create_service_key_test.go index 7f7df6590a3..0b9d94236f3 100644 --- a/cf/commands/servicekey/create_service_key_test.go +++ b/cf/commands/servicekey/create_service_key_test.go @@ -127,7 +127,7 @@ var _ = Describe("create-service-key command", func() { Expect(ui.Outputs).To(ContainSubstrings( []string{"FAILED"}, - []string{"Invalid JSON provided in -c argument"}, + []string{"Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON."}, )) }) }) @@ -175,7 +175,7 @@ var _ = Describe("create-service-key command", func() { Expect(ui.Outputs).To(ContainSubstrings( []string{"FAILED"}, - []string{"Invalid JSON provided in -c argument"}, + []string{"Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON."}, )) }) }) diff --git a/cf/i18n/resources/de_DE.all.json b/cf/i18n/resources/de_DE.all.json index acc5470fa4e..3243bbe2199 100644 --- a/cf/i18n/resources/de_DE.all.json +++ b/cf/i18n/resources/de_DE.all.json @@ -2604,11 +2604,6 @@ "translation": "Instance must be a non-negative integer", "modified": false }, - { - "id": "Invalid JSON provided in -c argument", - "translation": "Invalid JSON provided in -c argument", - "modified": false - }, { "id": "Invalid JSON response from server", "translation": "Invalid JSON response from server", @@ -2634,6 +2629,11 @@ "translation": "Invalid auth token: ", "modified": false }, + { + "id": "Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON.", + "translation": "Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON.", + "modified": false + }, { "id": "Invalid data from '{{.repoName}}' - plugin data does not exist", "translation": "Invalid data from '{{.repoName}}' - plugin data does not exist", diff --git a/cf/i18n/resources/en_US.all.json b/cf/i18n/resources/en_US.all.json index 583b9102ca2..fd695bd2196 100644 --- a/cf/i18n/resources/en_US.all.json +++ b/cf/i18n/resources/en_US.all.json @@ -2604,11 +2604,6 @@ "translation": "Instance must be a non-negative integer", "modified": false }, - { - "id": "Invalid JSON provided in -c argument", - "translation": "Invalid JSON provided in -c argument", - "modified": false - }, { "id": "Invalid JSON response from server", "translation": "Invalid JSON response from server", @@ -2634,6 +2629,11 @@ "translation": "Invalid auth token: ", "modified": false }, + { + "id": "Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON.", + "translation": "Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON.", + "modified": false + }, { "id": "Invalid data from '{{.repoName}}' - plugin data does not exist", "translation": "Invalid data from '{{.repoName}}' - plugin data does not exist", diff --git a/cf/i18n/resources/es_ES.all.json b/cf/i18n/resources/es_ES.all.json index 076cf48161d..eb14e194389 100644 --- a/cf/i18n/resources/es_ES.all.json +++ b/cf/i18n/resources/es_ES.all.json @@ -2604,11 +2604,6 @@ "translation": "Instance must be a non-negative integer", "modified": false }, - { - "id": "Invalid JSON provided in -c argument", - "translation": "Invalid JSON provided in -c argument", - "modified": false - }, { "id": "Invalid JSON response from server", "translation": "Respuesta JSON invalida del servidor", @@ -2634,6 +2629,11 @@ "translation": "Token de autenticacion inválido: ", "modified": false }, + { + "id": "Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON.", + "translation": "Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON.", + "modified": false + }, { "id": "Invalid data from '{{.repoName}}' - plugin data does not exist", "translation": "Invalid data from '{{.repoName}}' - plugin data does not exist", diff --git a/cf/i18n/resources/fr_FR.all.json b/cf/i18n/resources/fr_FR.all.json index 0c0a3739fc3..ad8a72c2788 100644 --- a/cf/i18n/resources/fr_FR.all.json +++ b/cf/i18n/resources/fr_FR.all.json @@ -2604,11 +2604,6 @@ "translation": "Instance must be a non-negative integer", "modified": false }, - { - "id": "Invalid JSON provided in -c argument", - "translation": "Invalid JSON provided in -c argument", - "modified": false - }, { "id": "Invalid JSON response from server", "translation": "Serveur JSON réponse invalide", @@ -2634,6 +2629,11 @@ "translation": "Jeton auth invalide: ", "modified": false }, + { + "id": "Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON.", + "translation": "Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON.", + "modified": false + }, { "id": "Invalid data from '{{.repoName}}' - plugin data does not exist", "translation": "Invalid data from '{{.repoName}}' - plugin data does not exist", diff --git a/cf/i18n/resources/it_IT.all.json b/cf/i18n/resources/it_IT.all.json index c1a16855390..ecfd63d3fbf 100644 --- a/cf/i18n/resources/it_IT.all.json +++ b/cf/i18n/resources/it_IT.all.json @@ -2604,11 +2604,6 @@ "translation": "Instance must be a non-negative integer", "modified": false }, - { - "id": "Invalid JSON provided in -c argument", - "translation": "Invalid JSON provided in -c argument", - "modified": false - }, { "id": "Invalid JSON response from server", "translation": "Invalid JSON response from server", @@ -2634,6 +2629,11 @@ "translation": "Invalid auth token: ", "modified": false }, + { + "id": "Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON.", + "translation": "Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON.", + "modified": false + }, { "id": "Invalid data from '{{.repoName}}' - plugin data does not exist", "translation": "Invalid data from '{{.repoName}}' - plugin data does not exist", diff --git a/cf/i18n/resources/ja_JA.all.json b/cf/i18n/resources/ja_JA.all.json index c1a16855390..ecfd63d3fbf 100644 --- a/cf/i18n/resources/ja_JA.all.json +++ b/cf/i18n/resources/ja_JA.all.json @@ -2604,11 +2604,6 @@ "translation": "Instance must be a non-negative integer", "modified": false }, - { - "id": "Invalid JSON provided in -c argument", - "translation": "Invalid JSON provided in -c argument", - "modified": false - }, { "id": "Invalid JSON response from server", "translation": "Invalid JSON response from server", @@ -2634,6 +2629,11 @@ "translation": "Invalid auth token: ", "modified": false }, + { + "id": "Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON.", + "translation": "Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON.", + "modified": false + }, { "id": "Invalid data from '{{.repoName}}' - plugin data does not exist", "translation": "Invalid data from '{{.repoName}}' - plugin data does not exist", diff --git a/cf/i18n/resources/pt_BR.all.json b/cf/i18n/resources/pt_BR.all.json index dacd49443dc..fa8528a474a 100644 --- a/cf/i18n/resources/pt_BR.all.json +++ b/cf/i18n/resources/pt_BR.all.json @@ -2604,11 +2604,6 @@ "translation": "Instance must be a non-negative integer", "modified": false }, - { - "id": "Invalid JSON provided in -c argument", - "translation": "Invalid JSON provided in -c argument", - "modified": false - }, { "id": "Invalid JSON response from server", "translation": "Resposta JSON do servidor inválida", @@ -2634,6 +2629,11 @@ "translation": "Token de autenticação inválido: ", "modified": false }, + { + "id": "Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON.", + "translation": "Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON.", + "modified": false + }, { "id": "Invalid data from '{{.repoName}}' - plugin data does not exist", "translation": "Invalid data from '{{.repoName}}' - plugin data does not exist", diff --git a/cf/i18n/resources/zh_Hans.all.json b/cf/i18n/resources/zh_Hans.all.json index 8662e916bc3..884cd02c707 100644 --- a/cf/i18n/resources/zh_Hans.all.json +++ b/cf/i18n/resources/zh_Hans.all.json @@ -2604,11 +2604,6 @@ "translation": "Instance must be a non-negative integer", "modified": false }, - { - "id": "Invalid JSON provided in -c argument", - "translation": "Invalid JSON provided in -c argument", - "modified": false - }, { "id": "Invalid JSON response from server", "translation": "无效的服务器JSON响应", @@ -2634,6 +2629,11 @@ "translation": "无效的身份验证令牌: ", "modified": false }, + { + "id": "Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON.", + "translation": "Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON.", + "modified": false + }, { "id": "Invalid data from '{{.repoName}}' - plugin data does not exist", "translation": "Invalid data from '{{.repoName}}' - plugin data does not exist", diff --git a/cf/i18n/resources/zh_Hant.all.json b/cf/i18n/resources/zh_Hant.all.json index acc5470fa4e..3243bbe2199 100644 --- a/cf/i18n/resources/zh_Hant.all.json +++ b/cf/i18n/resources/zh_Hant.all.json @@ -2604,11 +2604,6 @@ "translation": "Instance must be a non-negative integer", "modified": false }, - { - "id": "Invalid JSON provided in -c argument", - "translation": "Invalid JSON provided in -c argument", - "modified": false - }, { "id": "Invalid JSON response from server", "translation": "Invalid JSON response from server", @@ -2634,6 +2629,11 @@ "translation": "Invalid auth token: ", "modified": false }, + { + "id": "Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON.", + "translation": "Invalid configuration provided for -c flag. Please provide a valid JSON object or a file path containing valid JSON.", + "modified": false + }, { "id": "Invalid data from '{{.repoName}}' - plugin data does not exist", "translation": "Invalid data from '{{.repoName}}' - plugin data does not exist",