Skip to content

Unclear instructions from func invoke when no function is found in current directory #3017

@RayyanSeliya

Description

@RayyanSeliya

Current behavior:

When running func invoke outside of a function directory, the error message is technical and unhelpful for beginners:

Error: '/path/to/directory' does not contain an initialized function

Proposed improvement:

Make the error message more user-friendly and educational:

No function found in current directory.
You need to be inside a function directory to invoke it.

Try this:
  func create --language go myfunction    Create a new function
  cd myfunction                          Go into the function directory
  func invoke                            Now you can invoke it

Or if you have an existing function:
  cd path/to/your/function              Go to your function directory
  func invoke                           Invoke the function

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions