Skip to content

mtd.c: Enhance authorisation process messages#175

Merged
ac000 merged 1 commit into
masterfrom
auth-msg
Apr 16, 2026
Merged

mtd.c: Enhance authorisation process messages#175
ac000 merged 1 commit into
masterfrom
auth-msg

Conversation

@ac000

@ac000 ac000 commented Apr 16, 2026

Copy link
Copy Markdown
Owner

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.

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>
Copilot AI review requested due to automatic review settings April 16, 2026 17:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 if xdg-open is missing or fails the user gets no feedback and just continues to the auth-code prompt. Capture the return code (and/or errno) 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.

Comment thread src/mtd.c
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");

Copilot AI Apr 16, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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");

Copilot uses AI. Check for mistakes.
@ac000 ac000 merged commit b77df81 into master Apr 16, 2026
12 checks passed
@ac000 ac000 deleted the auth-msg branch April 16, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants