Skip to content

Commit d26b525

Browse files
committed
Improve the description formatting using backticks
Signed-off-by: RayyanSeliya <[email protected]>
1 parent dd7c94b commit d26b525

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

cmd/deploy.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,19 @@ func runDeploy(cmd *cobra.Command, newClient ClientFactory) (err error) {
254254
if !f.Initialized() {
255255
if !cfg.Remote || f.Build.Git.URL == "" {
256256
// Only error if this is not a fully remote build
257-
return fmt.Errorf("no function found in current directory.\nYou need to be inside a function directory to deploy it.\n\nTry this:\n func create --language go myfunction Create a new function\n cd myfunction Go into the function directory\n func deploy --registry <registry> Deploy to the cloud\n\nOr if you have an existing function:\n cd path/to/your/function Go to your function directory\n func deploy --registry <registry> Deploy the function\n\nFor more detailed deployment options, run 'func deploy --help'.")
257+
return fmt.Errorf(`no function found in current directory.
258+
You need to be inside a function directory to deploy it.
259+
260+
Try this:
261+
func create --language go myfunction Create a new function
262+
cd myfunction Go into the function directory
263+
func deploy --registry <registry> Deploy to the cloud
264+
265+
Or if you have an existing function:
266+
cd path/to/your/function Go to your function directory
267+
func deploy --registry <registry> Deploy the function
268+
269+
For more detailed deployment options, run 'func deploy --help'`)
258270
} else {
259271
// TODO: this case is not supported because the pipeline
260272
// implementation requires the function's name, which is in the

0 commit comments

Comments
 (0)