Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/invoke.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func runInvoke(cmd *cobra.Command, _ []string, newClient ClientFactory) (err err
return err
}
if !f.Initialized() {
return fn.NewErrNotInitialized(f.Root)
return fmt.Errorf("no function found in current directory.\nYou need to be inside a function directory to invoke it.\n\nTry this:\n func create --language go myfunction Create a new function\n cd myfunction Go into the function directory\n func invoke Now you can invoke it\n\nOr if you have an existing function:\n cd path/to/your/function Go to your function directory\n func invoke Invoke the function")
}

// Client instance from env vars, flags, args and user prompts (if --confirm)
Expand Down
Loading