Skip to content

Commit 2a3389e

Browse files
authored
Add browser opening log statement in login command (#1507)
1 parent c445496 commit 2a3389e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.changeset/log-login-url.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"ggt": patch
3+
---
4+
5+
Log the login URL for manual login in case of browser opening failure.

src/commands/login.ts

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export const login: Command = async (ctx): Promise<void> => {
6565
url.searchParams.set("returnTo", `https://${config.domains.services}/auth/cli/callback?port=${port}`);
6666

6767
try {
68+
ctx.log.info("opening browser", { url: url.toString() });
6869
await open(url.toString());
6970
println({ ensureEmptyLineAbove: true })`
7071
We've opened Gadget's login page using your default browser.

0 commit comments

Comments
 (0)