fix: un-awaited prompt when creating edge function from template #6631
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes CT-1060
When creating an edge function from a template, we weren't awaiting the step where we prompted the user for the route to register the edge function on, leading to the prompt being interrupted by the "Function created!" success message as the rest of
scaffoldFromTemplate
executed. This sometimes appeared as the CLI hanging, since the prompt for user input was no longer on the last line, making it easy to overlook that the CLI was waiting for user input.Unfortunately, difficult to test for this without reworking the
handleQuestions
test helper, which seems daunting right now 😬For us to review and ship your PR efficiently, please perform the following steps:
passes our tests.
A picture of a cute animal (not mandatory, but encouraged)

here is my cat playing a card game