Skip to content

Confusing Error Message When Using kn service update #829

@danielhelfand

Description

@danielhelfand

Bug report

When using kn service update with the helloworld-go service example, an odd error response comes when you run the following:

kn service update helloworld-go --env TARGET=Go Sample v2
'service update' requires the service name given as single argument

The issue has nothing to do with the service name argument. The issue is that --env TARGET=Go Sample v2 should be a string: --env TARGET="Go Sample v2".

Possibly related to #762 and #778.

Expected behavior

An error message along the lines of --env TARGET must be a string.

It seems as if this error comes up as unexpected in an area where a hard coded error message is in place for a specific issue.

Steps to reproduce the problem

  1. Create the helloworld-go service mentioned above
  2. Attempt to update the service with kn service update helloworld-go --env TARGET=Go Sample v2 without double quotes around the value of TARGET.

kn version

Version:      v0.14.0
Build Date:   2020-04-22 08:56:32
Git Revision: c41e9fd
Supported APIs:
* Serving
  - serving.knative.dev/v1 (knative-serving v0.14.0)
* Eventing
  - sources.knative.dev/v1alpha2 (knative-eventing v0.14.1)
  - eventing.knative.dev/v1alpha1 (knative-eventing v0.14.1)

Knative (serving/eventing) version

Serving: v0.14.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions