Skip to content

Commit 0befc5d

Browse files
authored
fix: accept --api-key flag for login (#70)
Closes #52
1 parent d11dfcb commit 0befc5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

commands/login/mod.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ export const login = command("login", {
2525
args: args()
2626
.tuple([z.string().describe("An API key to log in with.")])
2727
.optional(),
28-
}).run(async function* ({ args }) {
29-
let apiKey: string | undefined = args[0];
28+
}).run(async function* ({ args, flags }) {
29+
let apiKey: string | undefined = args[0] ?? flags["api-key"];
3030

3131
if (!apiKey) {
3232
try {

0 commit comments

Comments
 (0)