You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
iff, err=cfg.Configure(f); err!=nil { // Updates f with deploy cfg
254
-
return
255
-
}
256
-
cmd.SetContext(cfg.WithValues(cmd.Context())) // Some optional settings are passed via context
257
-
252
+
253
+
// Check if function exists BEFORE prompting for config
258
254
if!f.Initialized() {
259
255
if!cfg.Remote||f.Build.Git.URL=="" {
260
256
// Only error if this is not a fully remote build
261
-
returnfn.NewErrNotInitialized(f.Root)
257
+
returnfmt.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'.")
262
258
} else {
263
259
// TODO: this case is not supported because the pipeline
264
260
// implementation requires the function's name, which is in the
0 commit comments