Conversation
Try to make it a bit more clear when doing an authorisation that you should press ENTER to continue to have the authorisation endpoint loaded into a browser. Signed-off-by: Andrew Clayton <ac@sigsegv.uk>
There was a problem hiding this comment.
Pull request overview
Improves the interactive CLI messaging in mtd_init_auth() to make it clearer that the user must press ENTER before the authorisation URL is opened in a browser.
Changes:
- Updates the fallback browser text to mention pressing ENTER before expecting a browser popup.
- Expands the ENTER prompt to explicitly state it will attempt to open the authorisation endpoint.
Comments suppressed due to low confidence (1)
src/mtd.c:584
posix_spawnp(...)return value is ignored, so ifxdg-openis missing or fails the user gets no feedback and just continues to the auth-code prompt. Capture the return code (and/orerrno) and print a clear fallback message (e.g., that the URL above should be opened manually).
printf(" Press ENTER to continue and attempt to open the authorisation endpoint\n");
getchar();
posix_spawnp(&child_pid, args[0], NULL, NULL, (char * const *)args,
environ);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| printf("If a browser window doesn't pop up, you can use the below " | ||
| "url.\n\n"); | ||
| printf("If a browser window doesn't pop up after pressing ENTER,\n" | ||
| "you can use the below url.\n\n"); |
There was a problem hiding this comment.
For user-facing text, consider using the conventional capitalization "URL" instead of "url" (e.g., "the below URL").
Suggested change
| "you can use the below url.\n\n"); | |
| "you can use the below URL.\n\n"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Try to make it a bit more clear when doing an authorisation that you should press ENTER to continue to have the authorisation endpoint loaded into a browser.