Skip to content

Commit

Permalink
chore: refactor warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
avallete committed Dec 20, 2024
1 parent d930eec commit c35c704
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions internal/functions/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,15 @@ func GetFunctionConfig(slugs []string, importMapPath string, noVerifyJWT *bool,
}
}
if len(functionsWithFallback) > 0 {
fmt.Fprintf(os.Stderr, "Warning: The following functions are using the fallback import map at %s: %s\n",
msg := fmt.Sprintf(
utils.Yellow("WARNING: ")+
"The following functions are using the fallback import map at %s: %s\n"+
"This is not recommended outside of development. Please move import maps into each function folder.\n"+
"See: https://supabase.com/docs/guides/functions/import-maps\n",
fallbacksPath,
strings.Join(functionsWithFallback, ", "))
fmt.Fprintln(os.Stderr, "This is not recommended and will be deprecated. Please move import maps into each function folder.")
strings.Join(functionsWithFallback, ", "),
)
fmt.Fprint(os.Stderr, msg)
}
}

Expand Down

0 comments on commit c35c704

Please sign in to comment.